Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: src/bootstrapper.cc

Issue 233233004: Handlify GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/debug.cc » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 4cfebadd57bf27daceb15f1990d171781f75a5e9..785d8fdc1c142e935a042dee6b703511c8e09d8d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1517,9 +1517,9 @@ bool Genesis::CompileScriptCached(Isolate* isolate,
#define INSTALL_NATIVE(Type, name, var) \
Handle<String> var##_name = \
- factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR(name)); \
- Handle<Object> var##_native = GlobalObject::GetPropertyNoExceptionThrown( \
- handle(native_context()->builtins()), var##_name); \
+ factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR(name)); \
+ Handle<Object> var##_native = Object::GetProperty( \
+ handle(native_context()->builtins()), var##_name).ToHandleChecked(); \
native_context()->set_##var(Type::cast(*var##_native));
@@ -1895,7 +1895,7 @@ bool Genesis::InstallNatives() {
{ Handle<String> key = factory()->function_class_string();
Handle<JSFunction> function =
Handle<JSFunction>::cast(Object::GetProperty(
- isolate()->global_object(), key));
+ isolate()->global_object(), key).ToHandleChecked());
Handle<JSObject> proto =
Handle<JSObject>(JSObject::cast(function->instance_prototype()));
@@ -2044,7 +2044,7 @@ static Handle<JSObject> ResolveBuiltinIdHolder(
Handle<String> property_string = factory->InternalizeUtf8String(property);
ASSERT(!property_string.is_null());
Handle<JSFunction> function = Handle<JSFunction>::cast(
- Object::GetProperty(global, property_string));
+ Object::GetProperty(global, property_string).ToHandleChecked());
return Handle<JSObject>(JSObject::cast(function->prototype()));
}
@@ -2054,8 +2054,8 @@ static void InstallBuiltinFunctionId(Handle<JSObject> holder,
BuiltinFunctionId id) {
Factory* factory = holder->GetIsolate()->factory();
Handle<String> name = factory->InternalizeUtf8String(function_name);
- Handle<Object> function_object = Object::GetProperty(holder, name);
- ASSERT(!function_object.is_null());
+ Handle<Object> function_object =
+ Object::GetProperty(holder, name).ToHandleChecked();
Handle<JSFunction> function = Handle<JSFunction>::cast(function_object);
function->shared()->set_function_data(Smi::FromInt(id));
}
@@ -2351,7 +2351,7 @@ bool Genesis::InstallJSBuiltins(Handle<JSBuiltinsObject> builtins) {
Handle<String> name =
factory()->InternalizeUtf8String(Builtins::GetName(id));
Handle<Object> function_object =
- GlobalObject::GetPropertyNoExceptionThrown(builtins, name);
+ Object::GetProperty(builtins, name).ToHandleChecked();
Handle<JSFunction> function = Handle<JSFunction>::cast(function_object);
builtins->set_javascript_builtin(id, *function);
if (!Compiler::EnsureCompiled(function, CLEAR_EXCEPTION)) {
« no previous file with comments | « src/api.cc ('k') | src/debug.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698