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

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

Issue 680493002: Revert "Script streaming: Add an option to make the main thread block (wait for parsing)" (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
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptStreamer.h
diff --git a/Source/bindings/core/v8/ScriptStreamer.h b/Source/bindings/core/v8/ScriptStreamer.h
index 4df404303ff24639edf7b247ab9dc2e5e085504c..c61e1337c796281606fc7a327a178078222dd4d3 100644
--- a/Source/bindings/core/v8/ScriptStreamer.h
+++ b/Source/bindings/core/v8/ScriptStreamer.h
@@ -5,7 +5,6 @@
#ifndef ScriptStreamer_h
#define ScriptStreamer_h
-#include "bindings/core/v8/ScriptStreamingMode.h"
#include "core/dom/PendingScript.h"
#include "wtf/RefCounted.h"
@@ -83,7 +82,7 @@ public:
// Called by ScriptStreamingTask when it has streamed all data to V8 and V8
// has processed it.
- void streamingCompleteOnBackgroundThread();
+ void streamingComplete();
static void setSmallScriptThresholdForTesting(size_t threshold)
{
@@ -97,16 +96,10 @@ private:
// streamed. Non-const for testing.
static size_t kSmallScriptThreshold;
- ScriptStreamer(ScriptResource*, v8::ScriptCompiler::StreamedSource::Encoding, PendingScript::Type, ScriptStreamingMode);
+ ScriptStreamer(ScriptResource*, v8::ScriptCompiler::StreamedSource::Encoding, PendingScript::Type);
- void streamingComplete();
void notifyFinishedToClient();
- bool shouldBlockMainThread() const
- {
- return m_scriptStreamingMode == ScriptStreamingModeAllPlusBlockParsingBlocking && m_scriptType == PendingScript::ParsingBlocking;
- }
-
static const char* startedStreamingHistogramName(PendingScript::Type);
static bool startStreamingInternal(PendingScript&, Settings*, ScriptState*, PendingScript::Type);
@@ -125,9 +118,7 @@ private:
ScriptResourceClient* m_client;
WTF::OwnPtr<v8::ScriptCompiler::ScriptStreamingTask> m_task;
bool m_loadingFinished; // Whether loading from the network is done.
- // Whether the V8 side processing is done. Will be used by the main thread
- // and the streamer thread; guarded by m_mutex.
- bool m_parsingFinished;
+ bool m_parsingFinished; // Whether the V8 side processing is done.
// Whether we have received enough data to start the streaming.
bool m_haveEnoughDataForStreaming;
@@ -140,13 +131,6 @@ private:
// For recording metrics for different types of scripts separately.
PendingScript::Type m_scriptType;
-
- // Streaming mode defines whether the main thread should block and wait for
- // the parsing to complete after the load has finished. See
- // ScriptStreamer::notifyFinished for more information.
- ScriptStreamingMode m_scriptStreamingMode;
- Mutex m_mutex;
- ThreadCondition m_parsingFinishedCondition;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698