Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 07a249c8b403c88dae0f29328261a2c53cf49497..589cbdbd0986e2a51dc2e3f84b9f010e1f35466b 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -689,21 +689,16 @@ int HandleScope::NumberOfHandles() { |
} |
-i::Object** HandleScope::CreateHandle(i::Object* value) { |
- return i::HandleScope::CreateHandle(i::Isolate::Current(), value); |
-} |
- |
- |
i::Object** HandleScope::CreateHandle(i::Isolate* isolate, i::Object* value) { |
- ASSERT(isolate == i::Isolate::Current()); |
return i::HandleScope::CreateHandle(isolate, value); |
} |
-i::Object** HandleScope::CreateHandle(i::HeapObject* value) { |
- ASSERT(value->IsHeapObject()); |
+i::Object** HandleScope::CreateHandle(i::HeapObject* heap_object, |
+ i::Object* value) { |
+ ASSERT(heap_object->IsHeapObject()); |
return reinterpret_cast<i::Object**>( |
Michael Starzinger
2013/09/26 10:58:31
nit: The reinterpret_cast here should be obsolete.
|
- i::HandleScope::CreateHandle(value->GetIsolate(), value)); |
+ i::HandleScope::CreateHandle(heap_object->GetIsolate(), value)); |
} |
@@ -1921,8 +1916,9 @@ v8::TryCatch::TryCatch() |
v8::TryCatch::~TryCatch() { |
ASSERT(isolate_ == i::Isolate::Current()); |
if (rethrow_) { |
- v8::HandleScope scope(reinterpret_cast<Isolate*>(isolate_)); |
- v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(Exception()); |
+ v8::Isolate* isolate = reinterpret_cast<Isolate*>(isolate_); |
+ v8::HandleScope scope(isolate); |
+ v8::Local<v8::Value> exc = v8::Local<v8::Value>::New(isolate, Exception()); |
if (HasCaught() && capture_message_) { |
// If an exception was caught and rethrow_ is indicated, the saved |
// message, script, and location need to be restored to Isolate TLS |