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

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

Issue 303133004: Speculative fix for null m_documentLoader deref in FrameLoader::loadInSameDocument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 { 555 {
556 // If we have a state object, we cannot also be a new navigation. 556 // If we have a state object, we cannot also be a new navigation.
557 ASSERT(!stateObject || type == FrameLoadTypeBackForward); 557 ASSERT(!stateObject || type == FrameLoadTypeBackForward);
558 558
559 // If we have a provisional request for a different document, a fragment scr oll should cancel it. 559 // If we have a provisional request for a different document, a fragment scr oll should cancel it.
560 if (m_provisionalDocumentLoader) { 560 if (m_provisionalDocumentLoader) {
561 m_provisionalDocumentLoader->stopLoading(); 561 m_provisionalDocumentLoader->stopLoading();
562 if (m_provisionalDocumentLoader) 562 if (m_provisionalDocumentLoader)
563 m_provisionalDocumentLoader->detachFromFrame(); 563 m_provisionalDocumentLoader->detachFromFrame();
564 m_provisionalDocumentLoader = nullptr; 564 m_provisionalDocumentLoader = nullptr;
565 if (!m_frame->host())
566 return;
565 } 567 }
566 saveScrollState(); 568 saveScrollState();
567 569
568 KURL oldURL = m_frame->document()->url(); 570 KURL oldURL = m_frame->document()->url();
569 // If we were in the autoscroll/panScroll mode we want to stop it before fol lowing the link to the anchor 571 // If we were in the autoscroll/panScroll mode we want to stop it before fol lowing the link to the anchor
570 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragme ntIdentifier() != oldURL.fragmentIdentifier(); 572 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragme ntIdentifier() != oldURL.fragmentIdentifier();
571 if (hashChange) { 573 if (hashChange) {
572 m_frame->eventHandler().stopAutoscroll(); 574 m_frame->eventHandler().stopAutoscroll();
573 m_frame->domWindow()->enqueueHashchangeEvent(oldURL, url); 575 m_frame->domWindow()->enqueueHashchangeEvent(oldURL, url);
574 } 576 }
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 { 1441 {
1440 SandboxFlags flags = m_forcedSandboxFlags; 1442 SandboxFlags flags = m_forcedSandboxFlags;
1441 if (LocalFrame* parentFrame = m_frame->tree().parent()) 1443 if (LocalFrame* parentFrame = m_frame->tree().parent())
1442 flags |= parentFrame->document()->sandboxFlags(); 1444 flags |= parentFrame->document()->sandboxFlags();
1443 if (FrameOwner* frameOwner = m_frame->ownerElement()) 1445 if (FrameOwner* frameOwner = m_frame->ownerElement())
1444 flags |= frameOwner->sandboxFlags(); 1446 flags |= frameOwner->sandboxFlags();
1445 return flags; 1447 return flags;
1446 } 1448 }
1447 1449
1448 } // namespace WebCore 1450 } // 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