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

Unified Diff: Source/bindings/core/v8/ScriptStreamer.cpp

Issue 847803002: Make ScriptStreamer and dependents Oilpan friendly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add ScriptSourceCode::isNull() comment Created 5 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 | « Source/bindings/core/v8/ScriptStreamer.h ('k') | Source/bindings/core/v8/ScriptStreamerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/bindings/core/v8/ScriptStreamer.h ('k') | Source/bindings/core/v8/ScriptStreamerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698