Commit 3915e035 authored by japhet@chromium.org's avatar japhet@chromium.org

Fix crash in isDocumentDoneLoading()

Document::loader() might be null if re-entrancy is involved.

BUG=357570

Review URL: https://codereview.chromium.org/222433003

git-svn-id: svn://svn.chromium.org/blink/trunk@170693 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fb2c8b91
...@@ -912,6 +912,8 @@ FrameLoadType FrameLoader::loadType() const ...@@ -912,6 +912,8 @@ FrameLoadType FrameLoader::loadType() const
// If you're thinking of using it elsewhere, stop right now and reconsider your life. // If you're thinking of using it elsewhere, stop right now and reconsider your life.
static bool isDocumentDoneLoading(Document* document) static bool isDocumentDoneLoading(Document* document)
{ {
if (!document->loader())
return true;
if (document->loader()->isLoadingMainResource()) if (document->loader()->isLoadingMainResource())
return false; return false;
if (!document->loadEventFinished()) { if (!document->loadEventFinished()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment