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

Unified Diff: src/isolate.cc

Issue 1298733003: Reland of move 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/heap/heap.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 06cca0ab0bcfdb72af10f48c20d8f8fbc1b6ea36..155e9ead0870a7cb6a715eec114e3aaa4f557be7 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -845,17 +845,19 @@
// 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<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));
+ Handle<Object> exception;
+ if (bootstrapper()->IsActive()) {
+ // There is no boilerplate to use during bootstrapping.
+ exception = factory()->NewStringFromAsciiChecked(
+ MessageTemplate::TemplateString(MessageTemplate::kStackOverflow));
+ } else {
+ Handle<JSObject> boilerplate = stack_overflow_boilerplate();
+ Handle<JSObject> copy = factory()->CopyJSObject(boilerplate);
+ CaptureAndSetSimpleStackTrace(copy, factory()->undefined_value());
+ exception = copy;
+ }
Throw(*exception, nullptr);
- CaptureAndSetSimpleStackTrace(exception, factory()->undefined_value());
#ifdef VERIFY_HEAP
if (FLAG_verify_heap && FLAG_stress_compaction) {
heap()->CollectAllAvailableGarbage("trigger compaction");
« no previous file with comments | « src/heap/heap.h ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698