Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 222433003: Fix crash in isDocumentDoneLoading() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 905
906 FrameLoadType FrameLoader::loadType() const 906 FrameLoadType FrameLoader::loadType() const
907 { 907 {
908 return m_loadType; 908 return m_loadType;
909 } 909 }
910 910
911 // This function is an incomprehensible mess and is only used in checkLoadComple teForThisFrame. 911 // This function is an incomprehensible mess and is only used in checkLoadComple teForThisFrame.
912 // If you're thinking of using it elsewhere, stop right now and reconsider your life. 912 // If you're thinking of using it elsewhere, stop right now and reconsider your life.
913 static bool isDocumentDoneLoading(Document* document) 913 static bool isDocumentDoneLoading(Document* document)
914 { 914 {
915 if (!document->loader())
916 return true;
915 if (document->loader()->isLoadingMainResource()) 917 if (document->loader()->isLoadingMainResource())
916 return false; 918 return false;
917 if (!document->loadEventFinished()) { 919 if (!document->loadEventFinished()) {
918 if (document->loader()->isLoading() || document->isDelayingLoadEvent()) 920 if (document->loader()->isLoading() || document->isDelayingLoadEvent())
919 return false; 921 return false;
920 } 922 }
921 if (document->fetcher()->requestCount()) 923 if (document->fetcher()->requestCount())
922 return false; 924 return false;
923 if (document->processingLoadEvent()) 925 if (document->processingLoadEvent())
924 return false; 926 return false;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 { 1416 {
1415 SandboxFlags flags = m_forcedSandboxFlags; 1417 SandboxFlags flags = m_forcedSandboxFlags;
1416 if (LocalFrame* parentFrame = m_frame->tree().parent()) 1418 if (LocalFrame* parentFrame = m_frame->tree().parent())
1417 flags |= parentFrame->document()->sandboxFlags(); 1419 flags |= parentFrame->document()->sandboxFlags();
1418 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) 1420 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
1419 flags |= ownerElement->sandboxFlags(); 1421 flags |= ownerElement->sandboxFlags();
1420 return flags; 1422 return flags;
1421 } 1423 }
1422 1424
1423 } // namespace WebCore 1425 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698