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

Unified Diff: src/factory.cc

Issue 235083002: Reland "Handlify GetProperty." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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/execution.cc ('k') | src/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index cbaf753f0352014ba07db4a0528cc9b895c923e7..0682fba6444898e3eb0498b96b67193daf208734 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1122,7 +1122,7 @@ Handle<String> Factory::EmergencyNewError(const char* message,
space--;
if (space > 0) {
Handle<String> arg_str = Handle<String>::cast(
- Object::GetElementNoExceptionThrown(isolate(), args, i));
+ Object::GetElement(isolate(), args, i).ToHandleChecked());
SmartArrayPointer<char> arg = arg_str->ToCString();
Vector<char> v2(p, static_cast<int>(space));
OS::StrNCpy(v2, arg.get(), space);
@@ -1145,8 +1145,8 @@ Handle<Object> Factory::NewError(const char* maker,
const char* message,
Handle<JSArray> args) {
Handle<String> make_str = InternalizeUtf8String(maker);
- Handle<Object> fun_obj = GlobalObject::GetPropertyNoExceptionThrown(
- isolate()->js_builtins_object(), make_str);
+ Handle<Object> fun_obj = Object::GetProperty(
+ isolate()->js_builtins_object(), make_str).ToHandleChecked();
// If the builtins haven't been properly configured yet this error
// constructor may not have been defined. Bail out.
if (!fun_obj->IsJSFunction()) {
@@ -1179,9 +1179,8 @@ Handle<Object> Factory::NewError(Handle<String> message) {
Handle<Object> Factory::NewError(const char* constructor,
Handle<String> message) {
Handle<String> constr = InternalizeUtf8String(constructor);
- Handle<JSFunction> fun = Handle<JSFunction>::cast(
- GlobalObject::GetPropertyNoExceptionThrown(
- isolate()->js_builtins_object(), constr));
+ Handle<JSFunction> fun = Handle<JSFunction>::cast(Object::GetProperty(
+ isolate()->js_builtins_object(), constr).ToHandleChecked());
Handle<Object> argv[] = { message };
// Invoke the JavaScript factory method. If an exception is thrown while
« no previous file with comments | « src/execution.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698