Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 9a1ff600745869f079c186ee3b8d2e077a713809..1943683e45400b0c98ec1d280a5717f51df64a2c 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -1537,7 +1537,10 @@ void ObjectTemplate::SetInternalFieldCount(int value) { |
ScriptCompiler::CachedData::CachedData(const uint8_t* data_, int length_, |
BufferPolicy buffer_policy_) |
- : data(data_), length(length_), buffer_policy(buffer_policy_) {} |
+ : data(data_), |
+ length(length_), |
+ rejected(false), |
+ buffer_policy(buffer_policy_) {} |
ScriptCompiler::CachedData::~CachedData() { |
@@ -1753,6 +1756,8 @@ Local<UnboundScript> ScriptCompiler::CompileUnbound( |
source->cached_data = new CachedData( |
script_data->data(), script_data->length(), CachedData::BufferOwned); |
script_data->ReleaseDataOwnership(); |
+ } else if (options == kConsumeParserCache || options == kConsumeCodeCache) { |
+ source->cached_data->rejected = script_data->rejected(); |
} |
delete script_data; |
} |