| 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 5895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5906 | 5906 |
| 5907 | 5907 |
| 5908 void V8::SetRetainedObjectInfo(Isolate* exported_isolate, | 5908 void V8::SetRetainedObjectInfo(Isolate* exported_isolate, |
| 5909 UniqueId id, | 5909 UniqueId id, |
| 5910 RetainedObjectInfo* info) { | 5910 RetainedObjectInfo* info) { |
| 5911 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); | 5911 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); |
| 5912 isolate->global_handles()->SetRetainedObjectInfo(id, info); | 5912 isolate->global_handles()->SetRetainedObjectInfo(id, info); |
| 5913 } | 5913 } |
| 5914 | 5914 |
| 5915 | 5915 |
| 5916 void V8::SetObjectGroupRepresentativeObject( |
| 5917 Isolate* exported_isolate, |
| 5918 UniqueId id, |
| 5919 const Persistent<Object>& object) { |
| 5920 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); |
| 5921 isolate->global_handles()->SetRepresentativeObject( |
| 5922 id, |
| 5923 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*object)).location()); |
| 5924 } |
| 5925 |
| 5926 |
| 5916 void V8::AddImplicitReferences(Persistent<Object> parent, | 5927 void V8::AddImplicitReferences(Persistent<Object> parent, |
| 5917 Persistent<Value>* children, | 5928 Persistent<Value>* children, |
| 5918 size_t length) { | 5929 size_t length) { |
| 5919 i::Isolate* isolate = i::Isolate::Current(); | 5930 i::Isolate* isolate = i::Isolate::Current(); |
| 5920 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return; | 5931 if (IsDeadCheck(isolate, "v8::V8::AddImplicitReferences()")) return; |
| 5921 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); | 5932 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); |
| 5922 isolate->global_handles()->AddImplicitReferences( | 5933 isolate->global_handles()->AddImplicitReferences( |
| 5923 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*parent)).location(), | 5934 i::Handle<i::HeapObject>::cast(Utils::OpenHandle(*parent)).location(), |
| 5924 reinterpret_cast<i::Object***>(children), length); | 5935 reinterpret_cast<i::Object***>(children), length); |
| 5925 } | 5936 } |
| 5926 | 5937 |
| 5927 | 5938 |
| 5939 void V8::AddImplicitReference(Isolate* exported_isolate, |
| 5940 UniqueId id, |
| 5941 const Persistent<Value>& object) { |
| 5942 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(exported_isolate); |
| 5943 isolate->global_handles() |
| 5944 ->AddImplicitReference(id, reinterpret_cast<i::Object**>(*object)); |
| 5945 } |
| 5946 |
| 5947 |
| 5928 intptr_t Isolate::AdjustAmountOfExternalAllocatedMemory( | 5948 intptr_t Isolate::AdjustAmountOfExternalAllocatedMemory( |
| 5929 intptr_t change_in_bytes) { | 5949 intptr_t change_in_bytes) { |
| 5930 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); | 5950 i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap(); |
| 5931 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); | 5951 return heap->AdjustAmountOfExternalAllocatedMemory(change_in_bytes); |
| 5932 } | 5952 } |
| 5933 | 5953 |
| 5934 | 5954 |
| 5935 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { | 5955 intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { |
| 5936 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | 5956 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| 5937 if (isolate == NULL || !isolate->IsInitialized() || | 5957 if (isolate == NULL || !isolate->IsInitialized() || |
| (...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7366 | 7386 |
| 7367 v->VisitPointers(blocks_.first(), first_block_limit_); | 7387 v->VisitPointers(blocks_.first(), first_block_limit_); |
| 7368 | 7388 |
| 7369 for (int i = 1; i < blocks_.length(); i++) { | 7389 for (int i = 1; i < blocks_.length(); i++) { |
| 7370 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 7390 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
| 7371 } | 7391 } |
| 7372 } | 7392 } |
| 7373 | 7393 |
| 7374 | 7394 |
| 7375 } } // namespace v8::internal | 7395 } } // namespace v8::internal |
| OLD | NEW |