| 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());
|
|
|