| Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
|
| index 784bc80a209c04bca67ed7f00a77ffeb611c22e0..251e58d8d84e5903d7882644edaf0b7373b91870 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
|
| @@ -16,7 +16,6 @@ namespace blink {
|
| class PendingScript;
|
| class Resource;
|
| class ScriptResource;
|
| -class ScriptResourceClient;
|
| class ScriptState;
|
| class Settings;
|
| class SourceStream;
|
| @@ -38,11 +37,6 @@ public:
|
| Async
|
| };
|
|
|
| - static PassRefPtrWillBeRawPtr<ScriptStreamer> create(ScriptResource* resource, Type scriptType, ScriptState* scriptState, v8::ScriptCompiler::CompileOptions compileOptions, WebTaskRunner* loadingTaskRunner)
|
| - {
|
| - return adoptRefWillBeNoop(new ScriptStreamer(resource, scriptType, scriptState, compileOptions, loadingTaskRunner));
|
| - }
|
| -
|
| ~ScriptStreamer();
|
| DECLARE_TRACE();
|
|
|
| @@ -78,19 +72,6 @@ public:
|
| return m_compileOptions;
|
| }
|
|
|
| - void addClient(ScriptResourceClient* client)
|
| - {
|
| - ASSERT(!m_client);
|
| - m_client = client;
|
| - notifyFinishedToClient();
|
| - }
|
| -
|
| - void removeClient(ScriptResourceClient* client)
|
| - {
|
| - ASSERT(m_client == client);
|
| - m_client = 0;
|
| - }
|
| -
|
| // Called by PendingScript when data arrives from the network.
|
| void notifyAppendData(ScriptResource*);
|
| void notifyFinished(Resource*);
|
| @@ -113,13 +94,18 @@ private:
|
| // streamed. Non-const for testing.
|
| static size_t s_smallScriptThreshold;
|
|
|
| - ScriptStreamer(ScriptResource*, Type, ScriptState*, v8::ScriptCompiler::CompileOptions, WebTaskRunner*);
|
| + static PassRefPtrWillBeRawPtr<ScriptStreamer> create(PendingScript* script, Type scriptType, ScriptState* scriptState, v8::ScriptCompiler::CompileOptions compileOptions, WebTaskRunner* loadingTaskRunner)
|
| + {
|
| + return adoptRefWillBeNoop(new ScriptStreamer(script, scriptType, scriptState, compileOptions, loadingTaskRunner));
|
| + }
|
| + ScriptStreamer(PendingScript*, Type, ScriptState*, v8::ScriptCompiler::CompileOptions, WebTaskRunner*);
|
|
|
| void streamingComplete();
|
| void notifyFinishedToClient();
|
|
|
| static bool startStreamingInternal(PendingScript*, Type, Settings*, ScriptState*, WebTaskRunner*);
|
|
|
| + RawPtrWillBeMember<PendingScript> m_pendingScript;
|
| // This pointer is weak. If PendingScript and its Resource are deleted
|
| // before ScriptStreamer, PendingScript will notify ScriptStreamer of its
|
| // deletion by calling cancel().
|
| @@ -131,7 +117,6 @@ private:
|
|
|
| SourceStream* m_stream;
|
| OwnPtr<v8::ScriptCompiler::StreamedSource> m_source;
|
| - ScriptResourceClient* m_client;
|
| 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.
|
|
|