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

Side by Side Diff: Source/bindings/core/v8/ScriptStreamer.cpp

Issue 721373002: Revert "Optionally compress V8 code cache data with snappy." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/DEPS ('k') | Source/bindings/core/v8/V8CacheOptions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "bindings/core/v8/ScriptStreamer.h" 6 #include "bindings/core/v8/ScriptStreamer.h"
7 7
8 #include "bindings/core/v8/ScriptStreamerThread.h" 8 #include "bindings/core/v8/ScriptStreamerThread.h"
9 #include "bindings/core/v8/V8ScriptRunner.h" 9 #include "bindings/core/v8/V8ScriptRunner.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // to arrive. In general, the web servers don't seem to send the 538 // to arrive. In general, the web servers don't seem to send the
539 // Content-Length HTTP header for scripts. 539 // Content-Length HTTP header for scripts.
540 540
541 if (!scriptState->contextIsValid()) 541 if (!scriptState->contextIsValid())
542 return false; 542 return false;
543 543
544 // Decide what kind of cached data we should produce while streaming. By 544 // Decide what kind of cached data we should produce while streaming. By
545 // default, we generate the parser cache for streamed scripts, to emulate 545 // default, we generate the parser cache for streamed scripts, to emulate
546 // the non-streaming behavior (see V8ScriptRunner::compileScript). 546 // the non-streaming behavior (see V8ScriptRunner::compileScript).
547 v8::ScriptCompiler::CompileOptions compileOption = v8::ScriptCompiler::kProd uceParserCache; 547 v8::ScriptCompiler::CompileOptions compileOption = v8::ScriptCompiler::kProd uceParserCache;
548 if (settings->v8CacheOptions() == V8CacheOptionsCode || settings->v8CacheOpt ions() == V8CacheOptionsCodeCompressed) 548 if (settings->v8CacheOptions() == V8CacheOptionsCode)
549 compileOption = v8::ScriptCompiler::kProduceCodeCache; 549 compileOption = v8::ScriptCompiler::kProduceCodeCache;
550 550
551 // The Resource might go out of scope if the script is no longer 551 // The Resource might go out of scope if the script is no longer
552 // needed. This makes PendingScript notify the ScriptStreamer when it is 552 // needed. This makes PendingScript notify the ScriptStreamer when it is
553 // destroyed. 553 // destroyed.
554 script.setStreamer(adoptRef(new ScriptStreamer(resource, scriptType, setting s->v8ScriptStreamingMode(), scriptState, compileOption))); 554 script.setStreamer(adoptRef(new ScriptStreamer(resource, scriptType, setting s->v8ScriptStreamingMode(), scriptState, compileOption)));
555 555
556 return true; 556 return true;
557 } 557 }
558 558
559 } // namespace blink 559 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/DEPS ('k') | Source/bindings/core/v8/V8CacheOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698