Title: [228045] trunk/Source/WebCore
- Revision
- 228045
- Author
- dba...@webkit.org
- Date
- 2018-02-02 20:53:47 -0800 (Fri, 02 Feb 2018)
Log Message
Clean up FrameLoader::receivedFirstData()
https://bugs.webkit.org/show_bug.cgi?id=182361
Reviewed by Andy Estes.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (228044 => 228045)
--- trunk/Source/WebCore/ChangeLog 2018-02-03 04:22:04 UTC (rev 228044)
+++ trunk/Source/WebCore/ChangeLog 2018-02-03 04:53:47 UTC (rev 228045)
@@ -1,3 +1,13 @@
+2018-02-02 Daniel Bates <daba...@apple.com>
+
+ Clean up FrameLoader::receivedFirstData()
+ https://bugs.webkit.org/show_bug.cgi?id=182361
+
+ Reviewed by Andy Estes.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::receivedFirstData):
+
2018-02-02 Myles C. Maxfield <mmaxfi...@apple.com>
Test fix after r227995
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (228044 => 228045)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2018-02-03 04:22:04 UTC (rev 228044)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2018-02-03 04:53:47 UTC (rev 228045)
@@ -667,24 +667,22 @@
dispatchDidClearWindowObjectsInAllWorlds();
dispatchGlobalObjectAvailableInAllWorlds();
- if (m_documentLoader) {
- auto& title = m_documentLoader->title();
- if (!title.string.isNull())
- m_client.dispatchDidReceiveTitle(title);
- }
-
if (!m_documentLoader)
return;
+ auto& documentLoader = *m_documentLoader;
+ auto& title = documentLoader.title();
+ if (!title.string.isNull())
+ m_client.dispatchDidReceiveTitle(title);
+
ASSERT(m_frame.document());
auto& document = *m_frame.document();
- ASSERT(m_frame.document());
- LinkLoader::loadLinksFromHeader(m_documentLoader->response().httpHeaderField(HTTPHeaderName::Link), m_frame.document()->url(), *m_frame.document(), LinkLoader::MediaAttributeCheck::MediaAttributeEmpty);
+ LinkLoader::loadLinksFromHeader(documentLoader.response().httpHeaderField(HTTPHeaderName::Link), document.url(), document, LinkLoader::MediaAttributeCheck::MediaAttributeEmpty);
double delay;
String urlString;
- if (!parseHTTPRefresh(m_documentLoader->response().httpHeaderField(HTTPHeaderName::Refresh), delay, urlString))
+ if (!parseHTTPRefresh(documentLoader.response().httpHeaderField(HTTPHeaderName::Refresh), delay, urlString))
return;
auto completedURL = urlString.isEmpty() ? document.url() : document.completeURL(urlString);
if (!protocolIsJavaScript(completedURL))
@@ -691,7 +689,7 @@
m_frame.navigationScheduler().scheduleRedirect(document, delay, completedURL);
else {
auto message = "Refused to refresh " + document.url().stringCenterEllipsizedToLength() + " to a _javascript_: URL";
- m_frame.document()->addConsoleMessage(MessageSource::Security, MessageLevel::Error, message);
+ document.addConsoleMessage(MessageSource::Security, MessageLevel::Error, message);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes