 Chromium Code Reviews
 Chromium Code Reviews Issue 2687593002:
  PlzNavigate: Invoke didFailProvisionalLoad() in the renderer when a navigation request is cancelled…  (Closed)
    
  
    Issue 2687593002:
  PlzNavigate: Invoke didFailProvisionalLoad() in the renderer when a navigation request is cancelled…  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 
| 3 * reserved. | 3 * reserved. | 
| 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 
| 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 
| 6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) | 
| 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 
| 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 
| 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 
| 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1224 Document::NoDismissal) | 1224 Document::NoDismissal) | 
| 1225 return; | 1225 return; | 
| 1226 | 1226 | 
| 1227 // If this method is called from within this method, infinite recursion can | 1227 // If this method is called from within this method, infinite recursion can | 
| 1228 // occur (3442218). Avoid this. | 1228 // occur (3442218). Avoid this. | 
| 1229 if (m_inStopAllLoaders) | 1229 if (m_inStopAllLoaders) | 
| 1230 return; | 1230 return; | 
| 1231 | 1231 | 
| 1232 m_inStopAllLoaders = true; | 1232 m_inStopAllLoaders = true; | 
| 1233 | 1233 | 
| 1234 if (m_isNavigationHandledByClient && client()) { | |
| 
Nate Chapin
2017/02/09 00:10:07
I'm ~99% confident client() should be guaranteed n
 
ananta
2017/02/09 00:22:46
Thanks. Removed the null check
 | |
| 1235 client()->dispatchDidFailProvisionalLoad( | |
| 1236 ResourceError::cancelledError(String()), StandardCommit); | |
| 1237 } | |
| 1238 | |
| 1234 m_isNavigationHandledByClient = false; | 1239 m_isNavigationHandledByClient = false; | 
| 1235 | 1240 | 
| 1236 for (Frame* child = m_frame->tree().firstChild(); child; | 1241 for (Frame* child = m_frame->tree().firstChild(); child; | 
| 1237 child = child->tree().nextSibling()) { | 1242 child = child->tree().nextSibling()) { | 
| 1238 if (child->isLocalFrame()) | 1243 if (child->isLocalFrame()) | 
| 1239 toLocalFrame(child)->loader().stopAllLoaders(); | 1244 toLocalFrame(child)->loader().stopAllLoaders(); | 
| 1240 } | 1245 } | 
| 1241 | 1246 | 
| 1242 m_frame->document()->suppressLoadEvent(); | 1247 m_frame->document()->suppressLoadEvent(); | 
| 1243 if (m_documentLoader) | 1248 if (m_documentLoader) | 
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1997 frameLoadRequest.clientRedirect()); | 2002 frameLoadRequest.clientRedirect()); | 
| 1998 | 2003 | 
| 1999 loader->setLoadType(loadType); | 2004 loader->setLoadType(loadType); | 
| 2000 loader->setNavigationType(navigationType); | 2005 loader->setNavigationType(navigationType); | 
| 2001 loader->setReplacesCurrentHistoryItem(loadType == | 2006 loader->setReplacesCurrentHistoryItem(loadType == | 
| 2002 FrameLoadTypeReplaceCurrentItem); | 2007 FrameLoadTypeReplaceCurrentItem); | 
| 2003 return loader; | 2008 return loader; | 
| 2004 } | 2009 } | 
| 2005 | 2010 | 
| 2006 } // namespace blink | 2011 } // namespace blink | 
| OLD | NEW |