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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: mac fix Created 4 years 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: 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 c4fca3f28b527295b504dea46bab904d3ba0cb1c..d5b295b90fc90252be61f9f9e82af627855d6a62 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
@@ -45,7 +45,7 @@ class CORE_EXPORT ScriptStreamer final
Type,
Settings*,
ScriptState*,
- WebTaskRunner*);
+ RefPtr<WebTaskRunner>);
// Returns false if we cannot stream the given encoding.
static bool convertEncoding(const char* encodingName,
@@ -108,15 +108,15 @@ class CORE_EXPORT ScriptStreamer final
Type scriptType,
ScriptState* scriptState,
v8::ScriptCompiler::CompileOptions compileOptions,
- WebTaskRunner* loadingTaskRunner) {
+ RefPtr<WebTaskRunner> loadingTaskRunner) {
return new ScriptStreamer(script, scriptType, scriptState, compileOptions,
- loadingTaskRunner);
+ std::move(loadingTaskRunner));
}
ScriptStreamer(PendingScript*,
Type,
ScriptState*,
v8::ScriptCompiler::CompileOptions,
- WebTaskRunner*);
+ RefPtr<WebTaskRunner>);
void streamingComplete();
void notifyFinishedToClient();
@@ -125,7 +125,7 @@ class CORE_EXPORT ScriptStreamer final
Type,
Settings*,
ScriptState*,
- WebTaskRunner*);
+ RefPtr<WebTaskRunner>);
Member<PendingScript> m_pendingScript;
// This pointer is weak. If PendingScript and its Resource are deleted
@@ -169,7 +169,7 @@ class CORE_EXPORT ScriptStreamer final
// Encoding of the streamed script. Saved for sanity checking purposes.
v8::ScriptCompiler::StreamedSource::Encoding m_encoding;
- std::unique_ptr<WebTaskRunner> m_loadingTaskRunner;
+ RefPtr<WebTaskRunner> m_loadingTaskRunner;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698