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 cb7c474df2d46b0814f9c68a530559c54a86ab7e..2390472594f4cab8a43d11c1d908e6654767c68d 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h |
@@ -8,7 +8,6 @@ |
#include <memory> |
#include "core/CoreExport.h" |
-#include "platform/WebTaskRunner.h" |
#include "platform/heap/Handle.h" |
#include "platform/wtf/Noncopyable.h" |
#include "platform/wtf/text/WTFString.h" |
@@ -16,7 +15,7 @@ |
namespace blink { |
-class ClassicPendingScript; |
+class PendingScript; |
class Resource; |
class ScriptResource; |
class ScriptState; |
@@ -25,12 +24,12 @@ |
class WebTaskRunner; |
// ScriptStreamer streams incomplete script data to V8 so that it can be parsed |
-// while it's loaded. ClassicPendingScript holds a reference to ScriptStreamer. |
-// At the moment, ScriptStreamer is only used for parser blocking scripts; this |
-// means that the Document stays stable and no other scripts are executing |
-// while we're streaming. It is possible, though, that Document and the |
-// ClassicPendingScript are destroyed while the streaming is in progress, and |
-// ScriptStreamer handles it gracefully. |
+// while it's loaded. PendingScript holds a reference to ScriptStreamer. At the |
+// moment, ScriptStreamer is only used for parser blocking scripts; this means |
+// that the Document stays stable and no other scripts are executing while we're |
+// streaming. It is possible, though, that Document and the PendingScript are |
+// destroyed while the streaming is in progress, and ScriptStreamer handles it |
+// gracefully. |
class CORE_EXPORT ScriptStreamer final |
: public GarbageCollectedFinalized<ScriptStreamer> { |
WTF_MAKE_NONCOPYABLE(ScriptStreamer); |
@@ -42,8 +41,8 @@ |
DECLARE_TRACE(); |
// Launches a task (on a background thread) which will stream the given |
- // ClassicPendingScript into V8 as it loads. |
- static void StartStreaming(ClassicPendingScript*, |
+ // PendingScript into V8 as it loads. |
+ static void StartStreaming(PendingScript*, |
Type, |
Settings*, |
ScriptState*, |
@@ -59,9 +58,9 @@ |
ScriptResource* GetResource() const { return resource_; } |
// Called when the script is not needed any more (e.g., loading was |
- // cancelled). After calling cancel, ClassicPendingScript can drop its |
- // reference to ScriptStreamer, and ScriptStreamer takes care of eventually |
- // deleting itself (after the V8 side has finished too). |
+ // cancelled). After calling cancel, PendingScript can drop its reference to |
+ // ScriptStreamer, and ScriptStreamer takes care of eventually deleting |
+ // itself (after the V8 side has finished too). |
void Cancel(); |
// When the streaming is suppressed, the data is not given to V8, but |
@@ -77,7 +76,7 @@ |
return compile_options_; |
} |
- // Called by ClassicPendingScript when data arrives from the network. |
+ // Called by PendingScript when data arrives from the network. |
void NotifyAppendData(ScriptResource*); |
void NotifyFinished(Resource*); |
@@ -106,7 +105,7 @@ |
static size_t small_script_threshold_; |
static ScriptStreamer* Create( |
- ClassicPendingScript* script, |
+ PendingScript* script, |
Type script_type, |
ScriptState* script_state, |
v8::ScriptCompiler::CompileOptions compile_options, |
@@ -114,7 +113,7 @@ |
return new ScriptStreamer(script, script_type, script_state, |
compile_options, std::move(loading_task_runner)); |
} |
- ScriptStreamer(ClassicPendingScript*, |
+ ScriptStreamer(PendingScript*, |
Type, |
ScriptState*, |
v8::ScriptCompiler::CompileOptions, |
@@ -123,16 +122,16 @@ |
void StreamingComplete(); |
void NotifyFinishedToClient(); |
- static bool StartStreamingInternal(ClassicPendingScript*, |
+ static bool StartStreamingInternal(PendingScript*, |
Type, |
Settings*, |
ScriptState*, |
RefPtr<WebTaskRunner>); |
- Member<ClassicPendingScript> pending_script_; |
- // This pointer is weak. If ClassicPendingScript and its Resource are deleted |
- // before ScriptStreamer, ClassicPendingScript will notify ScriptStreamer of |
- // its deletion by calling cancel(). |
+ Member<PendingScript> pending_script_; |
+ // This pointer is weak. If PendingScript and its Resource are deleted |
+ // before ScriptStreamer, PendingScript will notify ScriptStreamer of its |
+ // deletion by calling cancel(). |
Member<ScriptResource> resource_; |
// Whether ScriptStreamer is detached from the Resource. In those cases, the |
// script data is not needed any more, and the client won't get notified |