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

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

Issue 1676793003: Revert of Don't set the origin twice when navigating for javascript: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentInit.cpp ('k') | 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL can cause the DocumentLoader to get deref'ed and possible destroyed, 320 // DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL can cause the DocumentLoader to get deref'ed and possible destroyed,
321 // so protect it with a RefPtr. 321 // so protect it with a RefPtr.
322 RefPtrWillBeRawPtr<DocumentLoader> documentLoader(m_frame->document()->loade r()); 322 RefPtrWillBeRawPtr<DocumentLoader> documentLoader(m_frame->document()->loade r());
323 323
324 UseCounter::count(*m_frame->document(), UseCounter::ReplaceDocumentViaJavaSc riptURL); 324 UseCounter::count(*m_frame->document(), UseCounter::ReplaceDocumentViaJavaSc riptURL);
325 325
326 // Prepare a DocumentInit before clearing the frame, because it may need to 326 // Prepare a DocumentInit before clearing the frame, because it may need to
327 // inherit an aliased security context. 327 // inherit an aliased security context.
328 DocumentInit init(m_frame->document()->url(), m_frame); 328 DocumentInit init(m_frame->document()->url(), m_frame);
329 init.withNewRegistrationContext(); 329 init.withNewRegistrationContext();
330 init.withoutInheritingSecurityOrigin();
331 330
332 stopAllLoaders(); 331 stopAllLoaders();
333 // Don't allow any new child frames to load in this frame: attaching a new 332 // Don't allow any new child frames to load in this frame: attaching a new
334 // child frame during or after detaching children results in an attached 333 // child frame during or after detaching children results in an attached
335 // frame on a detached DOM tree, which is bad. 334 // frame on a detached DOM tree, which is bad.
336 SubframeLoadingDisabler disabler(m_frame->document()); 335 SubframeLoadingDisabler disabler(m_frame->document());
337 m_frame->detachChildren(); 336 m_frame->detachChildren();
338 m_frame->document()->detach(); 337 m_frame->document()->detach();
339 clear(); 338 clear();
340 339
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 // FIXME: We need a way to propagate insecure requests policy flags to 1558 // FIXME: We need a way to propagate insecure requests policy flags to
1560 // out-of-process frames. For now, we'll always use default behavior. 1559 // out-of-process frames. For now, we'll always use default behavior.
1561 if (!parentFrame->isLocalFrame()) 1560 if (!parentFrame->isLocalFrame())
1562 return nullptr; 1561 return nullptr;
1563 1562
1564 ASSERT(toLocalFrame(parentFrame)->document()); 1563 ASSERT(toLocalFrame(parentFrame)->document());
1565 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1564 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1566 } 1565 }
1567 1566
1568 } // namespace blink 1567 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentInit.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698