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

Unified Diff: src/isolate.cc

Issue 1294123002: Revert of Remove property loads from js builtins objects from runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/contexts.h ('k') | src/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 298547477fa49eaa30040216b0c7d523d4012579..06e3c6113a90eb3a033a22cdea3c2cd66d24744c 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -845,8 +845,14 @@
// At this point we cannot create an Error object using its javascript
// constructor. Instead, we copy the pre-constructed boilerplate and
// attach the stack trace as a hidden property.
- Handle<JSObject> boilerplate = stack_overflow_boilerplate();
- Handle<JSObject> exception = factory()->CopyJSObject(boilerplate);
+ Handle<String> key = factory()->stack_overflow_string();
+ Handle<Object> boilerplate =
+ Object::GetProperty(js_builtins_object(), key).ToHandleChecked();
+ if (boilerplate->IsUndefined()) {
+ return Throw(heap()->undefined_value(), nullptr);
+ }
+ Handle<JSObject> exception =
+ factory()->CopyJSObject(Handle<JSObject>::cast(boilerplate));
Throw(*exception, nullptr);
CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value());
« no previous file with comments | « src/contexts.h ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698