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

Unified Diff: src/bootstrapper.cc

Issue 2636903002: Assert that context creation doesn't throw (Closed)
Patch Set: updates 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
« no previous file with comments | « src/assert-scope.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
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 9d1789143225916bcf774cce7f44fe2b3e34acaa..fddb31acc864dfbf950a1cdcd07425870cb84f01 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2996,12 +2996,16 @@ 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,
+ Execution::MessageHandling::kKeepPending, 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,
+ Execution::MessageHandling::kKeepPending, nullptr)
+ .is_null();
}
@@ -3013,7 +3017,9 @@ 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,
+ Execution::MessageHandling::kKeepPending, nullptr)
+ .is_null();
}
@@ -3055,7 +3061,9 @@ 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,
+ Execution::MessageHandling::kKeepPending, nullptr)
+ .is_null();
}
« no previous file with comments | « src/assert-scope.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698