diff --git a/src/api.cc b/src/api.cc index d6820781db..e9bc470f69 100644 --- a/src/api.cc +++ b/src/api.cc @@ -1902,10 +1902,8 @@ v8::Local v8::TryCatch::StackTrace() const { i::Handle obj(i::JSObject::cast(raw_obj), isolate_); i::Handle name = isolate_->factory()->stack_string(); if (!i::JSReceiver::HasProperty(obj, name)) return v8::Local(); - i::Handle value; - if (!i::Object::GetProperty(obj, name).ToHandle(&value)) { - return v8::Local(); - } + i::Handle value = i::Object::GetProperty(obj, name); + if (value.is_null()) return v8::Local(); return v8::Utils::ToLocal(scope.CloseAndEscape(value)); } else { return v8::Local(); @@ -2000,8 +1998,8 @@ MUST_USE_RESULT static i::MaybeHandle CallV8HeapFunction( i::Handle fmt_str = isolate->factory()->InternalizeUtf8String(name); i::Handle object_fun = - i::Object::GetProperty( - isolate->js_builtins_object(), fmt_str).ToHandleChecked(); + i::GlobalObject::GetPropertyNoExceptionThrown( + isolate->js_builtins_object(), fmt_str); i::Handle fun = i::Handle::cast(object_fun); return i::Execution::Call(isolate, fun, recv, argc, argv); } @@ -2131,7 +2129,7 @@ Local StackTrace::GetFrame(uint32_t index) const { EscapableHandleScope scope(reinterpret_cast(isolate)); i::Handle self = Utils::OpenHandle(this); i::Handle obj = - i::Object::GetElement(isolate, self, index).ToHandleChecked(); + i::Object::GetElementNoExceptionThrown(isolate, self, index); i::Handle jsobj = i::Handle::cast(obj); return scope.Escape(Utils::StackFrameToLocal(jsobj)); } @@ -2446,8 +2444,8 @@ static i::Object* LookupBuiltin(i::Isolate* isolate, const char* builtin_name) { i::Handle string = isolate->factory()->InternalizeUtf8String(builtin_name); - return *i::Object::GetProperty( - isolate->js_builtins_object(), string).ToHandleChecked(); + return *i::GlobalObject::GetPropertyNoExceptionThrown( + isolate->js_builtins_object(), string); } @@ -6960,8 +6958,8 @@ Local Debug::GetMirror(v8::Handle obj) { isolate_debug->debug_context()->global_object()); i::Handle name = isolate->factory()->InternalizeOneByteString( STATIC_ASCII_VECTOR("MakeMirror")); - i::Handle fun_obj = - i::Object::GetProperty(debug, name).ToHandleChecked(); + i::Handle fun_obj = i::Object::GetProperty(debug, name); + ASSERT(!fun_obj.is_null()); i::Handle fun = i::Handle::cast(fun_obj); v8::Handle v8_fun = Utils::ToLocal(fun); const int kArgc = 1; diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index b59bf5809e..4e5a2a22e7 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -1515,9 +1515,9 @@ bool Genesis::CompileScriptCached(Isolate* isolate, #define INSTALL_NATIVE(Type, name, var) \ Handle var##_name = \ - factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR(name)); \ - Handle var##_native = Object::GetProperty( \ - handle(native_context()->builtins()), var##_name).ToHandleChecked(); \ + factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR(name)); \ + Handle var##_native = GlobalObject::GetPropertyNoExceptionThrown( \ + handle(native_context()->builtins()), var##_name); \ native_context()->set_##var(Type::cast(*var##_native)); @@ -1893,7 +1893,7 @@ bool Genesis::InstallNatives() { { Handle key = factory()->function_class_string(); Handle function = Handle::cast(Object::GetProperty( - isolate()->global_object(), key).ToHandleChecked()); + isolate()->global_object(), key)); Handle proto = Handle(JSObject::cast(function->instance_prototype())); @@ -2042,7 +2042,7 @@ static Handle ResolveBuiltinIdHolder( Handle property_string = factory->InternalizeUtf8String(property); ASSERT(!property_string.is_null()); Handle function = Handle::cast( - Object::GetProperty(global, property_string).ToHandleChecked()); + Object::GetProperty(global, property_string)); return Handle(JSObject::cast(function->prototype())); } @@ -2052,8 +2052,8 @@ static void InstallBuiltinFunctionId(Handle holder, BuiltinFunctionId id) { Factory* factory = holder->GetIsolate()->factory(); Handle name = factory->InternalizeUtf8String(function_name); - Handle function_object = - Object::GetProperty(holder, name).ToHandleChecked(); + Handle function_object = Object::GetProperty(holder, name); + ASSERT(!function_object.is_null()); Handle function = Handle::cast(function_object); function->shared()->set_function_data(Smi::FromInt(id)); } @@ -2349,7 +2349,7 @@ bool Genesis::InstallJSBuiltins(Handle builtins) { Handle name = factory()->InternalizeUtf8String(Builtins::GetName(id)); Handle function_object = - Object::GetProperty(builtins, name).ToHandleChecked(); + GlobalObject::GetPropertyNoExceptionThrown(builtins, name); Handle function = Handle::cast(function_object); builtins->set_javascript_builtin(id, *function); if (!Compiler::EnsureCompiled(function, CLEAR_EXCEPTION)) { diff --git a/src/debug.cc b/src/debug.cc index 41c608a021..a1a648b92b 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1118,8 +1118,8 @@ bool Debug::CheckBreakPoint(Handle break_point_object) { STATIC_ASCII_VECTOR("IsBreakPointTriggered")); Handle debug_global(debug_context()->global_object()); Handle check_break_point = - Handle::cast(Object::GetProperty( - debug_global, is_break_point_triggered_string).ToHandleChecked()); + Handle::cast(GlobalObject::GetPropertyNoExceptionThrown( + debug_global, is_break_point_triggered_string)); // Get the break id as an object. Handle break_id = factory->NewNumberFromInt(Debug::break_id()); @@ -2459,8 +2459,8 @@ void Debug::ClearMirrorCache() { // Clear the mirror cache. Handle function_name = isolate_->factory()->InternalizeOneByteString( STATIC_ASCII_VECTOR("ClearMirrorCache")); - Handle fun = Object::GetProperty( - isolate_->global_object(), function_name).ToHandleChecked(); + Handle fun = GlobalObject::GetPropertyNoExceptionThrown( + isolate_->global_object(), function_name); ASSERT(fun->IsJSFunction()); Execution::TryCall( Handle::cast(fun), @@ -2597,8 +2597,8 @@ MaybeHandle Debugger::MakeJSObject( Handle constructor_str = isolate_->factory()->InternalizeUtf8String(constructor_name); ASSERT(!constructor_str.is_null()); - Handle constructor = Object::GetProperty( - isolate_->global_object(), constructor_str).ToHandleChecked(); + Handle constructor = GlobalObject::GetPropertyNoExceptionThrown( + isolate_->global_object(), constructor_str); ASSERT(constructor->IsJSFunction()); if (!constructor->IsJSFunction()) return MaybeHandle(); return Execution::TryCall( @@ -2788,8 +2788,8 @@ void Debugger::OnAfterCompile(Handle