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

Unified Diff: Source/bindings/core/v8/ScriptStreamer.h

Issue 655263003: Script streaming: fix small script recognition heuristic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: . Created 6 years, 2 months 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
Index: Source/bindings/core/v8/ScriptStreamer.h
diff --git a/Source/bindings/core/v8/ScriptStreamer.h b/Source/bindings/core/v8/ScriptStreamer.h
index 5dea593eb1ebede3051c3bf762e39a2f50496cdd..c61e1337c796281606fc7a327a178078222dd4d3 100644
--- a/Source/bindings/core/v8/ScriptStreamer.h
+++ b/Source/bindings/core/v8/ScriptStreamer.h
@@ -84,9 +84,9 @@ public:
// has processed it.
void streamingComplete();
- static void removeSmallScriptThresholdForTesting()
+ static void setSmallScriptThresholdForTesting(size_t threshold)
{
- kSmallScriptThreshold = 0;
+ kSmallScriptThreshold = threshold;
}
static size_t smallScriptThreshold() { return kSmallScriptThreshold; }
@@ -119,7 +119,8 @@ private:
WTF::OwnPtr<v8::ScriptCompiler::ScriptStreamingTask> m_task;
bool m_loadingFinished; // Whether loading from the network is done.
bool m_parsingFinished; // Whether the V8 side processing is done.
- bool m_firstDataChunkReceived;
+ // Whether we have received enough data to start the streaming.
+ bool m_haveEnoughDataForStreaming;
// Whether the script source code should be retrieved from the Resource
// instead of the ScriptStreamer.
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | Source/bindings/core/v8/ScriptStreamer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698