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

Unified Diff: src/api.cc

Issue 1207453002: Fixed exception handling in Realm.create(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 560dc34b3004860c59c24f2c60e10c0bef7ce342..03489d94916b3c2f4f7d87baad52e59be1fc2a53 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5584,7 +5584,12 @@ Local<Context> v8::Context::New(
if (extensions == NULL) extensions = &no_extensions;
i::Handle<i::Context> env =
CreateEnvironment(isolate, extensions, global_template, global_object);
- if (env.is_null()) return Local<Context>();
+ if (env.is_null()) {
+ if (isolate->has_pending_exception()) {
+ isolate->OptionalRescheduleException(true);
+ }
+ return Local<Context>();
+ }
return Utils::ToLocal(scope.CloseAndEscape(env));
}
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698