Title: [125815] trunk/Source/WebCore
- Revision
- 125815
- Author
- [email protected]
- Date
- 2012-08-16 15:29:48 -0700 (Thu, 16 Aug 2012)
Log Message
Null checks of m_frame->document()->domWindow() aren't needed
https://bugs.webkit.org/show_bug.cgi?id=94052
Reviewed by Eric Seidel.
If a document is attached to a frame, then its DOMWindow is necessarily
non-0. Checking for 0 is needless.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::checkLoadComplete):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
(WebCore::FrameLoader::didOpenURL):
(WebCore::FrameLoader::prepareForCachedPageRestore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (125814 => 125815)
--- trunk/Source/WebCore/ChangeLog 2012-08-16 22:18:52 UTC (rev 125814)
+++ trunk/Source/WebCore/ChangeLog 2012-08-16 22:29:48 UTC (rev 125815)
@@ -1,3 +1,20 @@
+2012-08-16 Adam Barth <[email protected]>
+
+ Null checks of m_frame->document()->domWindow() aren't needed
+ https://bugs.webkit.org/show_bug.cgi?id=94052
+
+ Reviewed by Eric Seidel.
+
+ If a document is attached to a frame, then its DOMWindow is necessarily
+ non-0. Checking for 0 is needless.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::checkLoadComplete):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::stopLoading):
+ (WebCore::FrameLoader::didOpenURL):
+ (WebCore::FrameLoader::prepareForCachedPageRestore):
+
2012-08-16 Max Feil <[email protected]>
[BlackBerry] Some media controls are mispositioned for dynamic live streams (HLS)
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (125814 => 125815)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2012-08-16 22:18:52 UTC (rev 125814)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2012-08-16 22:29:48 UTC (rev 125815)
@@ -428,9 +428,7 @@
if (!m_frame || isLoading())
return;
ASSERT(this == frameLoader()->activeDocumentLoader());
-
- if (DOMWindow* window = m_frame->document()->domWindow())
- window->finishedLoading();
+ m_frame->document()->domWindow()->finishedLoading();
}
void DocumentLoader::setFrame(Frame* frame)
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (125814 => 125815)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2012-08-16 22:18:52 UTC (rev 125814)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2012-08-16 22:29:48 UTC (rev 125815)
@@ -359,7 +359,7 @@
Node* currentFocusedNode = m_frame->document()->focusedNode();
if (currentFocusedNode)
currentFocusedNode->aboutToUnload();
- if (m_frame->document()->domWindow() && m_pageDismissalEventBeingDispatched == NoDismissal) {
+ if (m_pageDismissalEventBeingDispatched == NoDismissal) {
if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) {
m_pageDismissalEventBeingDispatched = PageHideDismissal;
m_frame->document()->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame->document()->inPageCache()), m_frame->document());
@@ -466,10 +466,9 @@
// its frame is not in a consistent state for rendering, so avoid setJSStatusBarText
// since it may cause clients to attempt to render the frame.
if (!m_stateMachine.creatingInitialEmptyDocument()) {
- if (DOMWindow* window = m_frame->document()->domWindow()) {
- window->setStatus(String());
- window->setDefaultStatus(String());
- }
+ DOMWindow* window = m_frame->document()->domWindow();
+ window->setStatus(String());
+ window->setDefaultStatus(String());
}
started();
@@ -1912,10 +1911,9 @@
// Delete old status bar messages (if it _was_ activated on last URL).
if (m_frame->script()->canExecuteScripts(NotAboutToExecuteScript)) {
- if (DOMWindow* window = m_frame->document()->domWindow()) {
- window->setStatus(String());
- window->setDefaultStatus(String());
- }
+ DOMWindow* window = m_frame->document()->domWindow();
+ window->setStatus(String());
+ window->setDefaultStatus(String());
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes