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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2393523002: Delay installing supplement objects (Closed)
Patch Set: temp Created 4 years, 2 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 | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 470
471 void LocalFrame::detachChildren() { 471 void LocalFrame::detachChildren() {
472 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()); 472 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document());
473 473
474 if (Document* document = this->document()) 474 if (Document* document = this->document())
475 ChildFrameDisconnector(*document).disconnect(); 475 ChildFrameDisconnector(*document).disconnect();
476 } 476 }
477 477
478 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { 478 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) {
479 // TODO(haraken): Update this comment.
479 // Oilpan: setDOMWindow() cannot be used when finalizing. Which 480 // Oilpan: setDOMWindow() cannot be used when finalizing. Which
480 // is acceptable as its actions are either not needed or handled 481 // is acceptable as its actions are either not needed or handled
481 // by other means -- 482 // by other means --
482 // 483 //
483 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have 484 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have
484 // signalled the Inspector frameWindowDiscarded() notifications. 485 // signalled the Inspector frameWindowDiscarded() notifications.
485 // We assume that all LocalFrames are detached, where that notification 486 // We assume that all LocalFrames are detached, where that notification
486 // will have been done. 487 // will have been done.
487 // 488 //
488 // - Calling LocalDOMWindow::reset() is not needed (called from 489 // - Calling LocalDOMWindow::reset() is not needed (called from
489 // Frame::setDOMWindow().) The Member references it clears will now 490 // Frame::setDOMWindow().) The Member references it clears will now
490 // die with the window. And the registered DOMWindowProperty instances that don't, 491 // die with the window. And the registered DOMWindowProperty instances that don't,
491 // only keep a weak reference to this frame, so there's no need to be 492 // only keep a weak reference to this frame, so there's no need to be
492 // explicitly notified that this frame is going away. 493 // explicitly notified that this frame is going away.
493 if (domWindow) 494 if (domWindow)
494 script().clearWindowProxy(); 495 script().clearWindowProxy();
495 496
496 if (m_domWindow) 497 if (m_domWindow)
497 m_domWindow->reset(); 498 m_domWindow->reset();
498 m_domWindow = domWindow; 499 m_domWindow = domWindow;
499 page()->chromeClient().installSupplements(*this);
500 } 500 }
501 501
502 Document* LocalFrame::document() const { 502 Document* LocalFrame::document() const {
503 return m_domWindow ? m_domWindow->document() : nullptr; 503 return m_domWindow ? m_domWindow->document() : nullptr;
504 } 504 }
505 505
506 void LocalFrame::setPagePopupOwner(Element& owner) { 506 void LocalFrame::setPagePopupOwner(Element& owner) {
507 m_pagePopupOwner = &owner; 507 m_pagePopupOwner = &owner;
508 } 508 }
509 509
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 892 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
893 m_frame->client()->frameBlameContext()->Enter(); 893 m_frame->client()->frameBlameContext()->Enter();
894 } 894 }
895 895
896 ScopedFrameBlamer::~ScopedFrameBlamer() { 896 ScopedFrameBlamer::~ScopedFrameBlamer() {
897 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 897 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
898 m_frame->client()->frameBlameContext()->Leave(); 898 m_frame->client()->frameBlameContext()->Leave();
899 } 899 }
900 900
901 } // namespace blink 901 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698