Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 402f22055c64919ad060ec28b333cfad311aa55e..5a5f14dc657385cda8d99072134ebdcd4ef7f588 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -35,6 +35,7 @@ |
#include "debug.h" |
#include "deoptimizer.h" |
#include "execution.h" |
+#include "flags.h" |
#include "global-handles.h" |
#include "heap-profiler.h" |
#include "messages.h" |
@@ -1405,7 +1406,7 @@ void ObjectTemplate::SetInternalFieldCount(int value) { |
ScriptData* ScriptData::PreCompile(const char* input, int length) { |
i::Utf8ToUC16CharacterStream stream( |
reinterpret_cast<const unsigned char*>(input), length); |
- return i::ParserApi::PreParse(&stream, NULL); |
+ return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); |
} |
@@ -1414,10 +1415,10 @@ ScriptData* ScriptData::PreCompile(v8::Handle<String> source) { |
if (str->IsExternalTwoByteString()) { |
i::ExternalTwoByteStringUC16CharacterStream stream( |
i::Handle<i::ExternalTwoByteString>::cast(str), 0, str->length()); |
- return i::ParserApi::PreParse(&stream, NULL); |
+ return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); |
} else { |
i::GenericStringUC16CharacterStream stream(str, 0, str->length()); |
- return i::ParserApi::PreParse(&stream, NULL); |
+ return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); |
} |
} |