Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 2b53bebcab00566ed6f61b8ff4a368f343cf099c..8d101631df9eddeb4bcdbfd7864087e99f97dee5 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -2224,7 +2224,7 @@ int StackFrame::GetLineNumber() const { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> line = GetProperty(self, "lineNumber"); |
+ i::Handle<i::Object> line = GetProperty(self, "lineNumber").ToHandleChecked(); |
if (!line->IsSmi()) { |
return Message::kNoLineNumberInfo; |
} |
@@ -2237,7 +2237,7 @@ int StackFrame::GetColumn() const { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> column = GetProperty(self, "column"); |
+ i::Handle<i::Object> column = GetProperty(self, "column").ToHandleChecked(); |
if (!column->IsSmi()) { |
return Message::kNoColumnInfo; |
} |
@@ -2250,7 +2250,8 @@ int StackFrame::GetScriptId() const { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> scriptId = GetProperty(self, "scriptId"); |
+ i::Handle<i::Object> scriptId = |
+ GetProperty(self, "scriptId").ToHandleChecked(); |
if (!scriptId->IsSmi()) { |
return Message::kNoScriptIdInfo; |
} |
@@ -2263,7 +2264,7 @@ Local<String> StackFrame::GetScriptName() const { |
ENTER_V8(isolate); |
EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate)); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> name = GetProperty(self, "scriptName"); |
+ i::Handle<i::Object> name = GetProperty(self, "scriptName").ToHandleChecked(); |
if (!name->IsString()) { |
return Local<String>(); |
} |
@@ -2276,7 +2277,8 @@ Local<String> StackFrame::GetScriptNameOrSourceURL() const { |
ENTER_V8(isolate); |
EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate)); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> name = GetProperty(self, "scriptNameOrSourceURL"); |
+ i::Handle<i::Object> name = |
+ GetProperty(self, "scriptNameOrSourceURL").ToHandleChecked(); |
if (!name->IsString()) { |
return Local<String>(); |
} |
@@ -2289,7 +2291,8 @@ Local<String> StackFrame::GetFunctionName() const { |
ENTER_V8(isolate); |
EscapableHandleScope scope(reinterpret_cast<Isolate*>(isolate)); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> name = GetProperty(self, "functionName"); |
+ i::Handle<i::Object> name = |
+ GetProperty(self, "functionName").ToHandleChecked(); |
if (!name->IsString()) { |
return Local<String>(); |
} |
@@ -2302,7 +2305,7 @@ bool StackFrame::IsEval() const { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> is_eval = GetProperty(self, "isEval"); |
+ i::Handle<i::Object> is_eval = GetProperty(self, "isEval").ToHandleChecked(); |
return is_eval->IsTrue(); |
} |
@@ -2312,7 +2315,8 @@ bool StackFrame::IsConstructor() const { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- i::Handle<i::Object> is_constructor = GetProperty(self, "isConstructor"); |
+ i::Handle<i::Object> is_constructor = |
+ GetProperty(self, "isConstructor").ToHandleChecked(); |
return is_constructor->IsTrue(); |
} |
@@ -3147,9 +3151,9 @@ Local<Value> v8::Object::Get(v8::Handle<Value> key) { |
i::Handle<i::Object> self = Utils::OpenHandle(this); |
i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); |
EXCEPTION_PREAMBLE(isolate); |
- i::Handle<i::Object> result = |
- i::Runtime::GetObjectProperty(isolate, self, key_obj); |
- has_pending_exception = result.is_null(); |
+ i::Handle<i::Object> result; |
+ has_pending_exception = |
+ !i::Runtime::GetObjectProperty(isolate, self, key_obj).ToHandle(&result); |
EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); |
return Utils::ToLocal(result); |
} |
@@ -3161,8 +3165,9 @@ Local<Value> v8::Object::Get(uint32_t index) { |
ENTER_V8(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
EXCEPTION_PREAMBLE(isolate); |
- i::Handle<i::Object> result = i::Object::GetElement(isolate, self, index); |
- has_pending_exception = result.is_null(); |
+ i::Handle<i::Object> result; |
+ has_pending_exception = |
+ !i::Object::GetElement(isolate, self, index).ToHandle(&result); |
EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); |
return Utils::ToLocal(result); |
} |
@@ -3247,10 +3252,11 @@ Local<Array> v8::Object::GetPropertyNames() { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- bool threw = false; |
- i::Handle<i::FixedArray> value = |
- i::GetKeysInFixedArrayFor(self, i::INCLUDE_PROTOS, &threw); |
- if (threw) return Local<v8::Array>(); |
+ EXCEPTION_PREAMBLE(isolate); |
+ i::Handle<i::FixedArray> value; |
+ has_pending_exception = |
+ !i::GetKeysInFixedArrayFor(self, i::INCLUDE_PROTOS).ToHandle(&value); |
+ EXCEPTION_BAILOUT_CHECK(isolate, Local<v8::Array>()); |
// Because we use caching to speed up enumeration it is important |
// to never change the result of the basic enumeration function so |
// we clone the result. |
@@ -3268,10 +3274,11 @@ Local<Array> v8::Object::GetOwnPropertyNames() { |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
- bool threw = false; |
- i::Handle<i::FixedArray> value = |
- i::GetKeysInFixedArrayFor(self, i::LOCAL_ONLY, &threw); |
- if (threw) return Local<v8::Array>(); |
+ EXCEPTION_PREAMBLE(isolate); |
+ i::Handle<i::FixedArray> value; |
+ has_pending_exception = |
+ !i::GetKeysInFixedArrayFor(self, i::LOCAL_ONLY).ToHandle(&value); |
+ EXCEPTION_BAILOUT_CHECK(isolate, Local<v8::Array>()); |
// Because we use caching to speed up enumeration it is important |
// to never change the result of the basic enumeration function so |
// we clone the result. |
@@ -6169,9 +6176,9 @@ Local<Symbol> v8::Symbol::For(Isolate* isolate, Local<String> name) { |
i::Handle<i::String> part = i_isolate->factory()->for_string(); |
i::Handle<i::JSObject> symbols = |
i::Handle<i::JSObject>::cast( |
- i::Object::GetPropertyOrElement(registry, part)); |
+ i::Object::GetPropertyOrElement(registry, part).ToHandleChecked()); |
i::Handle<i::Object> symbol = |
- i::Object::GetPropertyOrElement(symbols, i_name); |
+ i::Object::GetPropertyOrElement(symbols, i_name).ToHandleChecked(); |
if (!symbol->IsSymbol()) { |
ASSERT(symbol->IsUndefined()); |
symbol = i_isolate->factory()->NewSymbol(); |
@@ -6190,9 +6197,9 @@ Local<Symbol> v8::Symbol::ForApi(Isolate* isolate, Local<String> name) { |
i::Handle<i::String> part = i_isolate->factory()->for_api_string(); |
i::Handle<i::JSObject> symbols = |
i::Handle<i::JSObject>::cast( |
- i::Object::GetPropertyOrElement(registry, part)); |
+ i::Object::GetPropertyOrElement(registry, part).ToHandleChecked()); |
i::Handle<i::Object> symbol = |
- i::Object::GetPropertyOrElement(symbols, i_name); |
+ i::Object::GetPropertyOrElement(symbols, i_name).ToHandleChecked(); |
if (!symbol->IsSymbol()) { |
ASSERT(symbol->IsUndefined()); |
symbol = i_isolate->factory()->NewSymbol(); |
@@ -6223,9 +6230,9 @@ Local<Private> v8::Private::ForApi(Isolate* isolate, Local<String> name) { |
i::Handle<i::String> part = i_isolate->factory()->private_api_string(); |
i::Handle<i::JSObject> privates = |
i::Handle<i::JSObject>::cast( |
- i::Object::GetPropertyOrElement(registry, part)); |
+ i::Object::GetPropertyOrElement(registry, part).ToHandleChecked()); |
i::Handle<i::Object> symbol = |
- i::Object::GetPropertyOrElement(privates, i_name); |
+ i::Object::GetPropertyOrElement(privates, i_name).ToHandleChecked(); |
if (!symbol->IsSymbol()) { |
ASSERT(symbol->IsUndefined()); |
symbol = i_isolate->factory()->NewPrivateSymbol(); |