Commit 4fcbd46c authored by marja@chromium.org's avatar marja@chromium.org

Script streaming: turn off cached data to prevent crashes.

Cached data was turned on by r184826, and it seems we're producing invalid
cached data. Disabling the cached data for now; this needs to be debugged before
enabling it again.

In addition, it can be that we try to invoke streaming for already loaded async
scripts; handle that gracefully too.

BUG=

Review URL: https://codereview.chromium.org/705953002

git-svn-id: svn://svn.chromium.org/blink/trunk@184911 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 956b7d89
......@@ -506,7 +506,8 @@ bool ScriptStreamer::startStreamingInternal(PendingScript& script, Settings* set
return false;
ScriptResource* resource = script.resource();
ASSERT(!resource->isLoaded());
if (resource->isLoaded())
return false;
if (!resource->url().protocolIsInHTTPFamily())
return false;
if (resource->resourceToRevalidate()) {
......
......@@ -127,7 +127,9 @@ v8::Local<v8::Script> V8ScriptRunner::compileScript(v8::Handle<v8::String> code,
const v8::ScriptCompiler::CachedData* newCachedData = streamer->source()->GetCachedData();
if (newCachedData) {
resource->clearCachedMetadata();
resource->setCachedMetadata(streamer->cachedDataType(), reinterpret_cast<const char*>(newCachedData->data), newCachedData->length);
// Temporarily disable cached metadata for streaming; it's
// producing broken data. FIXME: enable it again.
// resource->setCachedMetadata(streamer->cachedDataType(), reinterpret_cast<const char*>(newCachedData->data), newCachedData->length);
}
} else if (!resource || !resource->url().protocolIsInHTTPFamily() || code->Length() < 1024) {
v8::ScriptCompiler::Source source(code, origin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment