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

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

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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/v8/ScheduledAction.cpp ('k') | Source/bindings/v8/ScriptEventListener.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index f9c10f02b3a4380cccb4f306f05b2ededf23dff2..21186b6010b275332f72c5b39e1ff4fb79969894 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -293,31 +293,31 @@ TextPosition ScriptController::eventHandlerPosition() const
return TextPosition::minimumPosition();
}
-static inline v8::Local<v8::Context> contextForWorld(ScriptController* scriptController, DOMWrapperWorld* world)
+static inline v8::Local<v8::Context> contextForWorld(ScriptController& scriptController, DOMWrapperWorld* world)
{
- return scriptController->windowShell(world)->context();
+ return scriptController.windowShell(world)->context();
}
v8::Local<v8::Context> ScriptController::currentWorldContext()
{
if (!v8::Context::InContext())
- return contextForWorld(this, mainThreadNormalWorld());
+ return contextForWorld(*this, mainThreadNormalWorld());
v8::Handle<v8::Context> context = v8::Context::GetEntered();
DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(context);
if (!isolatedWorld)
- return contextForWorld(this, mainThreadNormalWorld());
+ return contextForWorld(*this, mainThreadNormalWorld());
Frame* frame = toFrameIfNotDetached(context);
if (m_frame == frame)
return v8::Local<v8::Context>::New(m_isolate, context);
- return contextForWorld(this, isolatedWorld);
+ return contextForWorld(*this, isolatedWorld);
}
v8::Local<v8::Context> ScriptController::mainWorldContext()
{
- return contextForWorld(this, mainThreadNormalWorld());
+ return contextForWorld(*this, mainThreadNormalWorld());
}
v8::Local<v8::Context> ScriptController::mainWorldContext(Frame* frame)
« no previous file with comments | « Source/bindings/v8/ScheduledAction.cpp ('k') | Source/bindings/v8/ScriptEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698