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

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

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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: Source/bindings/core/v8/ScriptController.cpp
diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
index 7d0b0577f35902a87bb564695339c6170c05adba..6a38d7003a977f706b42ef98d375c14c1db87e35 100644
--- a/Source/bindings/core/v8/ScriptController.cpp
+++ b/Source/bindings/core/v8/ScriptController.cpp
@@ -142,7 +142,7 @@ void ScriptController::updateSecurityOrigin(SecurityOrigin* origin)
v8::Local<v8::Value> ScriptController::callFunction(v8::Handle<v8::Function> function, v8::Handle<v8::Value> receiver, int argc, v8::Handle<v8::Value> info[])
{
// Keep LocalFrame (and therefore ScriptController) alive.
- RefPtr<LocalFrame> protect(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protect(m_frame);
return ScriptController::callFunction(m_frame->document(), function, receiver, argc, info, m_isolate);
}
@@ -192,7 +192,7 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Handle<v8
*compilationFinishTime = WTF::monotonicallyIncreasingTime();
}
// Keep LocalFrame (and therefore ScriptController) alive.
- RefPtr<LocalFrame> protect(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protect(m_frame);
result = V8ScriptRunner::runCompiledScript(script, m_frame->document(), m_isolate);
ASSERT(!tryCatch.HasCaught() || result.IsEmpty());
}
@@ -537,7 +537,7 @@ bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url)
// We need to hold onto the LocalFrame here because executing script can
// destroy the frame.
- RefPtr<LocalFrame> protector(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protect(m_frame);
RefPtrWillBeRawPtr<Document> ownerDocument(m_frame->document());
const int javascriptSchemeLength = sizeof("javascript:") - 1;
@@ -600,7 +600,7 @@ v8::Local<v8::Value> ScriptController::evaluateScriptInMainWorld(const ScriptSou
ScriptState* scriptState = ScriptState::from(context);
ScriptState::Scope scope(scriptState);
- RefPtr<LocalFrame> protect(m_frame);
+ RefPtrWillBeRawPtr<LocalFrame> protect(m_frame);
if (m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument())
m_frame->loader().didAccessInitialDocument();

Powered by Google App Engine
This is Rietveld 408576698