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

Unified Diff: src/compiler.cc

Issue 650423005: Prohibit serializing with --harmony-scoping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: do not crash when --harmony is on Created 6 years, 2 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 | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 244ed8b7e34d8c0997a4fff4b634e56725ffeba5..b13cdd2614579488f343cc8a34cbf2e64cd03ab1 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1221,7 +1221,10 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
result = CompileToplevel(&info);
if (extension == NULL && !result.is_null() && !result->dont_cache()) {
compilation_cache->PutScript(source, context, result);
- if (FLAG_serialize_toplevel &&
+ // TODO(yangguo): Issue 3628
+ // With block scoping, top-level variables may resolve to a global,
+ // context, which makes the code context-dependent.
+ if (FLAG_serialize_toplevel && !FLAG_harmony_scoping &&
compile_options == ScriptCompiler::kProduceCodeCache) {
HistogramTimerScope histogram_timer(
isolate->counters()->compile_serialize());
« no previous file with comments | « no previous file | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698