| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 7291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7302 I::kAmountOfExternalAllocatedMemoryOffset); | 7302 I::kAmountOfExternalAllocatedMemoryOffset); |
| 7303 int64_t* amount_of_external_allocated_memory_at_last_global_gc = | 7303 int64_t* amount_of_external_allocated_memory_at_last_global_gc = |
| 7304 reinterpret_cast<int64_t*>( | 7304 reinterpret_cast<int64_t*>( |
| 7305 reinterpret_cast<uint8_t*>(this) + | 7305 reinterpret_cast<uint8_t*>(this) + |
| 7306 I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset); | 7306 I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset); |
| 7307 int64_t amount = *amount_of_external_allocated_memory + change_in_bytes; | 7307 int64_t amount = *amount_of_external_allocated_memory + change_in_bytes; |
| 7308 if (change_in_bytes > 0 && | 7308 if (change_in_bytes > 0 && |
| 7309 amount - *amount_of_external_allocated_memory_at_last_global_gc > | 7309 amount - *amount_of_external_allocated_memory_at_last_global_gc > |
| 7310 I::kExternalAllocationLimit) { | 7310 I::kExternalAllocationLimit) { |
| 7311 CollectAllGarbage("external memory allocation limit reached."); | 7311 CollectAllGarbage("external memory allocation limit reached."); |
| 7312 } else { | |
| 7313 *amount_of_external_allocated_memory = amount; | |
| 7314 } | 7312 } |
| 7313 *amount_of_external_allocated_memory = amount; |
| 7315 return *amount_of_external_allocated_memory; | 7314 return *amount_of_external_allocated_memory; |
| 7316 } | 7315 } |
| 7317 | 7316 |
| 7318 | 7317 |
| 7319 template<typename T> | 7318 template<typename T> |
| 7320 void Isolate::SetObjectGroupId(const Persistent<T>& object, | 7319 void Isolate::SetObjectGroupId(const Persistent<T>& object, |
| 7321 UniqueId id) { | 7320 UniqueId id) { |
| 7322 TYPE_CHECK(Value, T); | 7321 TYPE_CHECK(Value, T); |
| 7323 SetObjectGroupId(reinterpret_cast<v8::internal::Object**>(object.val_), id); | 7322 SetObjectGroupId(reinterpret_cast<v8::internal::Object**>(object.val_), id); |
| 7324 } | 7323 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7493 */ | 7492 */ |
| 7494 | 7493 |
| 7495 | 7494 |
| 7496 } // namespace v8 | 7495 } // namespace v8 |
| 7497 | 7496 |
| 7498 | 7497 |
| 7499 #undef TYPE_CHECK | 7498 #undef TYPE_CHECK |
| 7500 | 7499 |
| 7501 | 7500 |
| 7502 #endif // V8_H_ | 7501 #endif // V8_H_ |
| OLD | NEW |