Index: Source/bindings/core/v8/ScriptStreamer.cpp |
diff --git a/Source/bindings/core/v8/ScriptStreamer.cpp b/Source/bindings/core/v8/ScriptStreamer.cpp |
index 7de78502e6e71385b30aba4c9807fe169c025b69..b6c4c5e197699a77bfc1e012e8fc741f03fc9373 100644 |
--- a/Source/bindings/core/v8/ScriptStreamer.cpp |
+++ b/Source/bindings/core/v8/ScriptStreamer.cpp |
@@ -412,7 +412,7 @@ void ScriptStreamer::notifyFinished(Resource* resource) |
// Calling notifyFinishedToClient can result into the upper layers dropping |
// references to ScriptStreamer. Keep it alive until this function ends. |
- RefPtr<ScriptStreamer> protect(this); |
+ RefPtrWillBeRawPtr<ScriptStreamer> protect(this); |
notifyFinishedToClient(); |
@@ -443,6 +443,15 @@ ScriptStreamer::ScriptStreamer(ScriptResource* resource, PendingScript::Type scr |
{ |
} |
+ScriptStreamer::~ScriptStreamer() |
+{ |
+} |
+ |
+void ScriptStreamer::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_resource); |
+} |
+ |
void ScriptStreamer::streamingComplete() |
{ |
// The background task is completed; do the necessary ramp-down in the main |
@@ -544,7 +553,7 @@ bool ScriptStreamer::startStreamingInternal(PendingScript& script, Settings* set |
// The Resource might go out of scope if the script is no longer |
// needed. This makes PendingScript notify the ScriptStreamer when it is |
// destroyed. |
- script.setStreamer(adoptRef(new ScriptStreamer(resource, scriptType, settings->v8ScriptStreamingMode(), scriptState, compileOption))); |
+ script.setStreamer(ScriptStreamer::create(resource, scriptType, settings->v8ScriptStreamingMode(), scriptState, compileOption)); |
return true; |
} |