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

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

Issue 2795673002: Added UseCounter for clearing browsing context name on cross-origin name (Closed)
Patch Set: Rebase-update Created 3 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
OLDNEW
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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 SubframeLoadingDisabler disabler(m_frame->document()); 366 SubframeLoadingDisabler disabler(m_frame->document());
367 m_frame->detachChildren(); 367 m_frame->detachChildren();
368 m_frame->document()->shutdown(); 368 m_frame->document()->shutdown();
369 clear(); 369 clear();
370 370
371 // detachChildren() potentially detaches the frame from the document. The 371 // detachChildren() potentially detaches the frame from the document. The
372 // loading cannot continue in that case. 372 // loading cannot continue in that case.
373 if (!m_frame->page()) 373 if (!m_frame->page())
374 return; 374 return;
375 375
376 SecurityOrigin* frameSecurityOrigin =
377 frameSecurityOrigin = m_frame->document()->getSecurityOrigin();
378
376 client()->transitionToCommittedForNewPage(); 379 client()->transitionToCommittedForNewPage();
377 documentLoader->replaceDocumentWhileExecutingJavaScriptURL(init, source); 380 documentLoader->replaceDocumentWhileExecutingJavaScriptURL(
381 init, source, frameSecurityOrigin);
378 } 382 }
379 383
380 void FrameLoader::finishedParsing() { 384 void FrameLoader::finishedParsing() {
381 if (m_stateMachine.creatingInitialEmptyDocument()) 385 if (m_stateMachine.creatingInitialEmptyDocument())
382 return; 386 return;
383 387
384 m_progressTracker->finishedParsing(); 388 m_progressTracker->finishedParsing();
385 389
386 if (client()) { 390 if (client()) {
387 ScriptForbiddenScope forbidScripts; 391 ScriptForbiddenScope forbidScripts;
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 // TODO(japhet): This is needed because the browser process DCHECKs if the 1755 // TODO(japhet): This is needed because the browser process DCHECKs if the
1752 // first entry we commit in a new frame has replacement set. It's unclear 1756 // first entry we commit in a new frame has replacement set. It's unclear
1753 // whether the DCHECK is right, investigate removing this special case. 1757 // whether the DCHECK is right, investigate removing this special case.
1754 bool replaceCurrentItem = loadType == FrameLoadTypeReplaceCurrentItem && 1758 bool replaceCurrentItem = loadType == FrameLoadTypeReplaceCurrentItem &&
1755 (!opener() || !request.url().isEmpty()); 1759 (!opener() || !request.url().isEmpty());
1756 loader->setReplacesCurrentHistoryItem(replaceCurrentItem); 1760 loader->setReplacesCurrentHistoryItem(replaceCurrentItem);
1757 return loader; 1761 return loader;
1758 } 1762 }
1759 1763
1760 } // namespace blink 1764 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698