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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp

Issue 2653923008: Reland of Split PendingScript into PendingScript and ClassicPendingScript (Closed)
Patch Set: Crash fix by adding Dispose() as ClassicPendingScript prefinalizer Created 3 years, 8 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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp
index 33371b16fe92ae558f97a5c387645be307e5aea1..fee2484b1453558e00c721adfad34582f8f41363 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerImpl.cpp
@@ -7,9 +7,9 @@
#include <memory>
#include "bindings/core/v8/ScriptStreamerThread.h"
#include "bindings/core/v8/V8ScriptRunner.h"
+#include "core/dom/ClassicPendingScript.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
-#include "core/dom/PendingScript.h"
#include "core/frame/Settings.h"
#include "core/html/parser/TextResourceDecoder.h"
#include "core/loader/resource/ScriptResource.h"
@@ -328,7 +328,7 @@ class SourceStream : public v8::ScriptCompiler::ExternalSourceStream {
size_t ScriptStreamerImpl::small_script_threshold_ = 30 * 1024;
void ScriptStreamerImpl::StartStreaming(
- PendingScript* script,
+ ClassicPendingScript* script,
Type script_type,
Settings* settings,
ScriptState* script_state,
@@ -518,7 +518,7 @@ void ScriptStreamerImpl::NotifyFinished(Resource* resource) {
}
ScriptStreamerImpl::ScriptStreamerImpl(
- PendingScript* script,
+ ClassicPendingScript* script,
Type script_type,
ScriptState* script_state,
v8::ScriptCompiler::CompileOptions compile_options,
@@ -583,7 +583,7 @@ void ScriptStreamerImpl::NotifyFinishedToClient() {
}
bool ScriptStreamerImpl::StartStreamingInternal(
- PendingScript* script,
+ ClassicPendingScript* script,
Type script_type,
Settings* settings,
ScriptState* script_state,
@@ -602,7 +602,7 @@ bool ScriptStreamerImpl::StartStreamingInternal(
if (resource->IsCacheValidator()) {
RecordNotStreamingReasonHistogram(script_type, kReload);
// This happens e.g., during reloads. We're actually not going to load
- // the current Resource of the PendingScript but switch to another
+ // the current Resource of the ClassicPendingScript but switch to another
// Resource -> don't stream.
return false;
}
@@ -618,7 +618,7 @@ bool ScriptStreamerImpl::StartStreamingInternal(
compile_option = v8::ScriptCompiler::kProduceParserCache;
// The Resource might go out of scope if the script is no longer needed.
- // This makes PendingScript notify the ScriptStreamerImpl when it is
+ // This makes ClassicPendingScript notify the ScriptStreamerImpl when it is
// destroyed.
script->SetStreamer(ScriptStreamerImpl::Create(
script, script_type, script_state, compile_option,

Powered by Google App Engine
This is Rietveld 408576698