| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 6352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6363 void V8::SetFailedAccessCheckCallbackFunction( | 6363 void V8::SetFailedAccessCheckCallbackFunction( |
| 6364 FailedAccessCheckCallback callback) { | 6364 FailedAccessCheckCallback callback) { |
| 6365 i::Isolate* isolate = i::Isolate::Current(); | 6365 i::Isolate* isolate = i::Isolate::Current(); |
| 6366 if (IsDeadCheck(isolate, "v8::V8::SetFailedAccessCheckCallbackFunction()")) { | 6366 if (IsDeadCheck(isolate, "v8::V8::SetFailedAccessCheckCallbackFunction()")) { |
| 6367 return; | 6367 return; |
| 6368 } | 6368 } |
| 6369 isolate->SetFailedAccessCheckCallback(callback); | 6369 isolate->SetFailedAccessCheckCallback(callback); |
| 6370 } | 6370 } |
| 6371 | 6371 |
| 6372 | 6372 |
| 6373 void V8::AddObjectGroup(Persistent<Value>* objects, | |
| 6374 size_t length, | |
| 6375 RetainedObjectInfo* info) { | |
| 6376 i::Isolate* isolate = i::Isolate::Current(); | |
| 6377 if (IsDeadCheck(isolate, "v8::V8::AddObjectGroup()")) return; | |
| 6378 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); | |
| 6379 isolate->global_handles()->AddObjectGroup( | |
| 6380 reinterpret_cast<i::Object***>(objects), length, info); | |
| 6381 } | |
| 6382 | |
| 6383 | |
| 6384 void V8::AddObjectGroup(Isolate* exported_isolate, | |
| 6385 Persistent<Value>* objects, | |
| 6386 size_t length, | |
| 6387 RetainedObjectInfo* info) { | |
| 6388 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); | |
| 6389 ASSERT(isolate == i::Isolate::Current()); | |
| 6390 if (IsDeadCheck(isolate, "v8::V8::AddObjectGroup()")) return; | |
| 6391 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); | |
| 6392 isolate->global_handles()->AddObjectGroup( | |
| 6393 reinterpret_cast<i::Object***>(objects), length, info); | |
| 6394 } | |
| 6395 | |
| 6396 | |
| 6397 void V8::AddImplicitReferences(Persistent<Object> parent, | |
| 6398 Persistent<Value>* children, | |
| 6399 size_t length) { | |
| 6400 i::Isolate* isolate = i::Isolate::Current(); | |
| 6401 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return; | |
| 6402 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); | |
| 6403 isolate->global_handles()->AddImplicitReferences( | |
| 6404 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*parent)).location(), | |
| 6405 reinterpret_cast<i::Object***>(children), length); | |
| 6406 } | |
| 6407 | |
| 6408 | |
| 6409 intptr_t Isolate::AdjustAmountOfExternalAllocatedMemory( | 6373 intptr_t Isolate::AdjustAmountOfExternalAllocatedMemory( |
| 6410 intptr_t change_in_bytes) { | 6374 intptr_t change_in_bytes) { |
| 6411 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); | 6375 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); |
| 6412 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); | 6376 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); |
| 6413 } | 6377 } |
| 6414 | 6378 |
| 6415 | 6379 |
| 6416 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { | 6380 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { |
| 6417 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 6381 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 6418 if (isolate == NULL || !isolate->IsInitialized() || | 6382 if (isolate == NULL || !isolate->IsInitialized() || |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7899 | 7863 |
| 7900 v->VisitPointers(blocks_.first(), first_block_limit_); | 7864 v->VisitPointers(blocks_.first(), first_block_limit_); |
| 7901 | 7865 |
| 7902 for (int i = 1; i < blocks_.length(); i++) { | 7866 for (int i = 1; i < blocks_.length(); i++) { |
| 7903 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 7867 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
| 7904 } | 7868 } |
| 7905 } | 7869 } |
| 7906 | 7870 |
| 7907 | 7871 |
| 7908 } } // namespace v8::internal | 7872 } } // namespace v8::internal |
| OLD | NEW |