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

Unified Diff: Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 708093002: Script streaming: remove byte order marks, detect encoding based on them. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix: don't persist cached data produced by streaming Created 6 years, 1 month 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 | « Source/bindings/core/v8/ScriptStreamerTest.cpp ('k') | Source/core/html/parser/TextResourceDecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8ScriptRunner.cpp
diff --git a/Source/bindings/core/v8/V8ScriptRunner.cpp b/Source/bindings/core/v8/V8ScriptRunner.cpp
index 32c1659c872e8b86209ad46c5ca06629f3132916..71a86becbd9539d4911793591189016ed0bade6c 100644
--- a/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -127,9 +127,7 @@ v8::Local<v8::Script> V8ScriptRunner::compileScript(v8::Handle<v8::String> code,
const v8::ScriptCompiler::CachedData* newCachedData = streamer->source()->GetCachedData();
if (newCachedData) {
resource->clearCachedMetadata();
- // 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);
+ resource->setCachedMetadata(streamer->cachedDataType(), reinterpret_cast<const char*>(newCachedData->data), newCachedData->length, Resource::CacheLocally);
}
} else if (!resource || !resource->url().protocolIsInHTTPFamily() || code->Length() < 1024) {
v8::ScriptCompiler::Source source(code, origin);
« no previous file with comments | « Source/bindings/core/v8/ScriptStreamerTest.cpp ('k') | Source/core/html/parser/TextResourceDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698