We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
https://bugs.webkit.org/show_bug.cgi?id=116119

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-05-15
Reviewed by Oliver Hunt.

MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
cleared when we cancel the loader.

No new tests needed.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::continueAfterNavigationPolicy):
(WebCore::DocumentLoader::cancelMainResourceLoad):
(WebCore::DocumentLoader::clearMainResource):
(WebCore):
* loader/DocumentLoader.h: add helper method clearMainResource()
(DocumentLoader):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed