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

Unified Diff: src/bootstrapper.cc

Issue 231883007: Return MaybeHandle from Invoke. (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/builtins.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 35f8869b7ce1f6aeb3b748920f5d4c6c6159c078..90c032ea8008ee12a2200a0dafb372c75da846d4 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1508,10 +1508,8 @@ bool Genesis::CompileScriptCached(Isolate* isolate,
? top_context->builtins()
: top_context->global_object(),
isolate);
- bool has_pending_exception;
- Execution::Call(isolate, fun, receiver, 0, NULL, &has_pending_exception);
- if (has_pending_exception) return false;
- return true;
+ return !Execution::Call(
+ isolate, fun, receiver, 0, NULL).is_null();
}
@@ -2401,10 +2399,10 @@ bool Genesis::ConfigureApiObject(Handle<JSObject> object,
ASSERT(FunctionTemplateInfo::cast(object_template->constructor())
->IsTemplateFor(object->map()));;
- bool pending_exception = false;
- Handle<JSObject> obj =
- Execution::InstantiateObject(object_template, &pending_exception);
- if (pending_exception) {
+ MaybeHandle<JSObject> maybe_obj =
+ Execution::InstantiateObject(object_template);
+ Handle<JSObject> obj;
+ if (!maybe_obj.ToHandle(&obj)) {
ASSERT(isolate()->has_pending_exception());
isolate()->clear_pending_exception();
return false;
« no previous file with comments | « src/api.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698