Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 954f82144135a95cf2832a5cf90c135c7ab96135..f3f5b16914ea2c5f4a146575f8dc3f06a587b58b 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -5275,8 +5275,9 @@ void V8::AddImplicitReferences(Persistent<Object> parent, |
| intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) { |
| - i::Isolate* isolate = i::Isolate::Current(); |
| - if (IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) { |
| + i::Isolate* isolate = i::Isolate::UncheckedCurrent(); |
| + if (isolate == NULL || !isolate->IsInitialized() || |
|
Erik Corry
2012/08/07 07:32:13
This seems a bit fragile. If we are silently igno
ulan
2012/08/07 09:05:52
It's tricky with all those transfers between threa
|
| + IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) { |
| return 0; |
| } |
| return isolate->heap()->AdjustAmountOfExternalAllocatedMemory( |