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

Unified Diff: Source/modules/screen_orientation/ScreenOrientation.cpp

Issue 879423003: Move Location to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/modules/screen_orientation/ScreenOrientation.cpp
diff --git a/Source/modules/screen_orientation/ScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenOrientation.cpp
index 4e9e94984059939577a1285955073f48182816de..d5a552152fdcb314b62ba12fdb341514d8842fdc 100644
--- a/Source/modules/screen_orientation/ScreenOrientation.cpp
+++ b/Source/modules/screen_orientation/ScreenOrientation.cpp
@@ -119,9 +119,9 @@ const WTF::AtomicString& ScreenOrientation::interfaceName() const
ExecutionContext* ScreenOrientation::executionContext() const
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- return m_frame->document();
+ return localFrame()->document();
}
String ScreenOrientation::type() const
@@ -149,7 +149,7 @@ ScriptPromise ScreenOrientation::lock(ScriptState* state, const AtomicString& lo
RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(state);
ScriptPromise promise = resolver->promise();
- Document* document = m_frame ? m_frame->document() : 0;
+ Document* document = localFrame() ? localFrame()->document() : 0;
if (!document || !controller()) {
RefPtrWillBeRawPtr<DOMException> exception = DOMException::create(InvalidStateError, "The object is no longer associated to a document.");
@@ -177,10 +177,10 @@ void ScreenOrientation::unlock()
ScreenOrientationController* ScreenOrientation::controller()
{
- if (!m_frame)
+ if (!localFrame())
return 0;
- return ScreenOrientationController::from(*m_frame);
+ return ScreenOrientationController::from(*localFrame());
}
void ScreenOrientation::trace(Visitor* visitor)

Powered by Google App Engine
This is Rietveld 408576698