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

Unified Diff: src/bootstrapper.cc

Issue 2636903002: Assert that context creation doesn't throw (Closed)
Patch Set: Created 3 years, 11 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 9d1789143225916bcf774cce7f44fe2b3e34acaa..b07de79fbcfe17e7fd78e4efe89b6cef4d876f57 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2996,12 +2996,14 @@ bool Bootstrapper::CompileNative(Isolate* isolate, Vector<const char> name,
// For non-extension scripts, run script to get the function wrapper.
Handle<Object> wrapper;
- if (!Execution::Call(isolate, fun, receiver, 0, NULL).ToHandle(&wrapper)) {
+ if (!Execution::TryCall(isolate, fun, receiver, 0, nullptr, nullptr)
+ .ToHandle(&wrapper)) {
return false;
}
// Then run the function wrapper.
- return !Execution::Call(isolate, Handle<JSFunction>::cast(wrapper), receiver,
- argc, argv).is_null();
+ return !Execution::TryCall(isolate, Handle<JSFunction>::cast(wrapper),
+ receiver, argc, argv, nullptr)
+ .is_null();
}
@@ -3013,7 +3015,8 @@ bool Genesis::CallUtilsFunction(Isolate* isolate, const char* name) {
Handle<Object> fun = JSObject::GetDataProperty(utils, name_string);
Handle<Object> receiver = isolate->factory()->undefined_value();
Handle<Object> args[] = {utils};
- return !Execution::Call(isolate, fun, receiver, 1, args).is_null();
+ return !Execution::TryCall(isolate, fun, receiver, 1, args, nullptr)
+ .is_null();
}
@@ -3055,7 +3058,8 @@ bool Genesis::CompileExtension(Isolate* isolate, v8::Extension* extension) {
// Call function using either the runtime object or the global
// object as the receiver. Provide no parameters.
Handle<Object> receiver = isolate->global_object();
- return !Execution::Call(isolate, fun, receiver, 0, NULL).is_null();
+ return !Execution::TryCall(isolate, fun, receiver, 0, nullptr, nullptr)
+ .is_null();
}

Powered by Google App Engine
This is Rietveld 408576698