Title: [117181] trunk/Source/WebCore
- Revision
- 117181
- Author
- [email protected]
- Date
- 2012-05-15 16:31:43 -0700 (Tue, 15 May 2012)
Log Message
MainResourceLoader::load() always returns true, so make it return
void and delete the related dead code.
https://bugs.webkit.org/show_bug.cgi?id=86413
Reviewed by Alexey Proskuryakov.
No new tests, cleanup only.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::load):
* loader/MainResourceLoader.h:
(MainResourceLoader):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (117180 => 117181)
--- trunk/Source/WebCore/ChangeLog 2012-05-15 23:31:28 UTC (rev 117180)
+++ trunk/Source/WebCore/ChangeLog 2012-05-15 23:31:43 UTC (rev 117181)
@@ -1,3 +1,20 @@
+2012-05-15 Nate Chapin <[email protected]>
+
+ MainResourceLoader::load() always returns true, so make it return
+ void and delete the related dead code.
+ https://bugs.webkit.org/show_bug.cgi?id=86413
+
+ Reviewed by Alexey Proskuryakov.
+
+ No new tests, cleanup only.
+
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::startLoadingMainResource):
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::load):
+ * loader/MainResourceLoader.h:
+ (MainResourceLoader):
+
2012-05-15 Ian Vollick <[email protected]>
[chromium] Ensure animations get ticked at least once when added.
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (117180 => 117181)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2012-05-15 23:31:28 UTC (rev 117180)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2012-05-15 23:31:43 UTC (rev 117181)
@@ -837,17 +837,7 @@
// FIXME: Is there any way the extra fields could have not been added by now?
// If not, it would be great to remove this line of code.
frameLoader()->addExtraFieldsToMainResourceRequest(m_request);
-
- // Protect MainResourceLoader::load() method chain from clearMainResourceLoader() stomping m_mainResourceLoader.
- RefPtr<MainResourceLoader> protectedMainResourceLoader(m_mainResourceLoader);
- if (!protectedMainResourceLoader->load(m_request, m_substituteData)) {
- // FIXME: If this should really be caught, we should just ASSERT this doesn't happen;
- // should it be caught by other parts of WebKit or other parts of the app?
- LOG_ERROR("could not create WebResourceHandle for URL %s -- should be caught by policy handler level", m_request.url().string().ascii().data());
- m_mainResourceLoader = 0;
- ASSERT(!isLoading());
- checkLoadComplete();
- }
+ m_mainResourceLoader->load(m_request, m_substituteData);
}
void DocumentLoader::cancelMainResourceLoad(const ResourceError& error)
Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (117180 => 117181)
--- trunk/Source/WebCore/loader/MainResourceLoader.cpp 2012-05-15 23:31:28 UTC (rev 117180)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp 2012-05-15 23:31:43 UTC (rev 117181)
@@ -651,10 +651,14 @@
return false;
}
-bool MainResourceLoader::load(const ResourceRequest& r, const SubstituteData& substituteData)
+void MainResourceLoader::load(const ResourceRequest& r, const SubstituteData& substituteData)
{
ASSERT(!m_handle);
+ // It appears that it is possible for this load to be cancelled and derefenced by the DocumentLoader
+ // in willSendRequest() if loadNow() is called.
+ RefPtr<MainResourceLoader> protect(this);
+
m_substituteData = substituteData;
ASSERT(documentLoader()->timing()->navigationStart());
@@ -679,8 +683,6 @@
}
if (defer)
m_initialRequest = request;
-
- return true;
}
void MainResourceLoader::setDefersLoading(bool defers)
Modified: trunk/Source/WebCore/loader/MainResourceLoader.h (117180 => 117181)
--- trunk/Source/WebCore/loader/MainResourceLoader.h 2012-05-15 23:31:28 UTC (rev 117180)
+++ trunk/Source/WebCore/loader/MainResourceLoader.h 2012-05-15 23:31:43 UTC (rev 117181)
@@ -54,7 +54,7 @@
static PassRefPtr<MainResourceLoader> create(Frame*);
virtual ~MainResourceLoader();
- virtual bool load(const ResourceRequest&, const SubstituteData&);
+ void load(const ResourceRequest&, const SubstituteData&);
virtual void addData(const char*, int, bool allAtOnce);
virtual void setDefersLoading(bool);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes