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

Unified Diff: src/bootstrapper.cc

Issue 1301533002: Add DCHECK that the script context table do not contain native scripts. (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 | « no previous file | no next file » | 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 967b07161f9ead03c71ba9974486935515dbe6fe..506b638ddea58dbe9d424a76c185e3c026a37912 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -3225,7 +3225,6 @@ Genesis::Genesis(Isolate* isolate,
native_context()->set_natives_utils_object(
isolate->heap()->undefined_value());
}
-
// The serializer cannot serialize typed arrays. Reset those typed arrays
// for each new context.
InitializeBuiltinTypedArrays();
@@ -3235,6 +3234,10 @@ Genesis::Genesis(Isolate* isolate,
if (!InstallDebuggerNatives()) return;
}
+ // Check that the script context table is empty except for the 'this' binding.
+ // We do not need script contexts for native scripts.
+ DCHECK_EQ(1, native_context()->script_context_table()->used());
+
result_ = native_context();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698