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

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

Issue 1569273004: Move ResourceOwner on to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win_chromium_compile_dbg_ng is the worst Created 4 years, 11 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 | third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c002175480a9180c27b37d325d81a35dfaa3c6cf..18913b464778f2c3038b79126de54ef1f0b4682d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
@@ -6,7 +6,6 @@
#define ScriptStreamer_h
#include "core/CoreExport.h"
-#include "core/dom/PendingScript.h"
#include "platform/heap/Handle.h"
#include "wtf/RefCounted.h"
@@ -33,7 +32,13 @@ class WebTaskRunner;
class CORE_EXPORT ScriptStreamer final : public RefCountedWillBeRefCountedGarbageCollected<ScriptStreamer> {
WTF_MAKE_NONCOPYABLE(ScriptStreamer);
public:
- static PassRefPtrWillBeRawPtr<ScriptStreamer> create(ScriptResource* resource, PendingScript::Type scriptType, ScriptState* scriptState, v8::ScriptCompiler::CompileOptions compileOptions, WebTaskRunner* loadingTaskRunner)
+ enum Type {
+ ParsingBlocking,
+ Deferred,
+ 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));
}
@@ -43,7 +48,7 @@ public:
// Launches a task (on a background thread) which will stream the given
// PendingScript into V8 as it loads.
- static void startStreaming(PendingScript&, PendingScript::Type, Settings*, ScriptState*, WebTaskRunner*);
+ static void startStreaming(PendingScript*, Type, Settings*, ScriptState*, WebTaskRunner*);
// Returns false if we cannot stream the given encoding.
static bool convertEncoding(const char* encodingName, v8::ScriptCompiler::StreamedSource::Encoding*);
@@ -108,12 +113,12 @@ private:
// streamed. Non-const for testing.
static size_t kSmallScriptThreshold;
- ScriptStreamer(ScriptResource*, PendingScript::Type, ScriptState*, v8::ScriptCompiler::CompileOptions, WebTaskRunner*);
+ ScriptStreamer(ScriptResource*, Type, ScriptState*, v8::ScriptCompiler::CompileOptions, WebTaskRunner*);
void streamingComplete();
void notifyFinishedToClient();
- static bool startStreamingInternal(PendingScript&, PendingScript::Type, Settings*, ScriptState*, WebTaskRunner*);
+ static bool startStreamingInternal(PendingScript*, Type, Settings*, ScriptState*, WebTaskRunner*);
// This pointer is weak. If PendingScript and its Resource are deleted
// before ScriptStreamer, PendingScript will notify ScriptStreamer of its
@@ -144,7 +149,7 @@ private:
RefPtr<ScriptState> m_scriptState;
// For recording metrics for different types of scripts separately.
- PendingScript::Type m_scriptType;
+ Type m_scriptType;
mutable Mutex m_mutex;
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698