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

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

Issue 2589633003: Remove a comment on LocalFrame::setDOMWindow (Closed)
Patch Set: Created 4 years 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 | 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) 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 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 DCHECK(document()); 499 DCHECK(document());
500 selection().documentAttached(document()); 500 selection().documentAttached(document());
501 inputMethodController().documentAttached(document()); 501 inputMethodController().documentAttached(document());
502 } 502 }
503 503
504 LocalDOMWindow* LocalFrame::domWindow() const { 504 LocalDOMWindow* LocalFrame::domWindow() const {
505 return toLocalDOMWindow(m_domWindow); 505 return toLocalDOMWindow(m_domWindow);
506 } 506 }
507 507
508 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { 508 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) {
509 // TODO(haraken): Update this comment.
510 // Oilpan: setDOMWindow() cannot be used when finalizing. Which
511 // is acceptable as its actions are either not needed or handled
512 // by other means --
513 //
514 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have
515 // signalled the Inspector frameWindowDiscarded() notifications.
516 // We assume that all LocalFrames are detached, where that notification
517 // will have been done.
518 //
519 // - Calling LocalDOMWindow::reset() is not needed (called from
520 // Frame::setDOMWindow().) The Member references it clears will now
521 // die with the window. And the registered DOMWindowProperty instances that
522 // don't, only keep a weak reference to this frame, so there's no need to
523 // be explicitly notified that this frame is going away.
524 if (domWindow) 509 if (domWindow)
525 script().clearWindowProxy(); 510 script().clearWindowProxy();
526 511
527 if (this->domWindow()) 512 if (this->domWindow())
528 this->domWindow()->reset(); 513 this->domWindow()->reset();
529 m_domWindow = domWindow; 514 m_domWindow = domWindow;
530 } 515 }
531 516
532 Document* LocalFrame::document() const { 517 Document* LocalFrame::document() const {
533 return m_domWindow ? m_domWindow->document() : nullptr; 518 return m_domWindow ? m_domWindow->document() : nullptr;
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 927 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
943 m_frame->client()->frameBlameContext()->Enter(); 928 m_frame->client()->frameBlameContext()->Enter();
944 } 929 }
945 930
946 ScopedFrameBlamer::~ScopedFrameBlamer() { 931 ScopedFrameBlamer::~ScopedFrameBlamer() {
947 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 932 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
948 m_frame->client()->frameBlameContext()->Leave(); 933 m_frame->client()->frameBlameContext()->Leave();
949 } 934 }
950 935
951 } // namespace blink 936 } // namespace blink
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