Chromium Code Reviews

Side by Side Diff: Source/core/page/Page.cpp

Issue 960223002: Detach SpeechRecognitionController upon page detach. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust assert and allow repeated observer detaches Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 592 matching lines...)
603 #ifndef NDEBUG 603 #ifndef NDEBUG
604 pageCounter.decrement(); 604 pageCounter.decrement();
605 #endif 605 #endif
606 606
607 m_chrome->willBeDestroyed(); 607 m_chrome->willBeDestroyed();
608 if (m_validationMessageClient) 608 if (m_validationMessageClient)
609 m_validationMessageClient->willBeDestroyed(); 609 m_validationMessageClient->willBeDestroyed();
610 m_mainFrame = nullptr; 610 m_mainFrame = nullptr;
611 611
612 Page::notifyContextDestroyed(); 612 Page::notifyContextDestroyed();
613 Page::detachObservers();
haraken 2015/02/26 16:29:05 Hmm, I might want to avoid introducing another lif
sof 2015/02/26 17:01:22 Yes, the explicit clearing here is not without pro
613 } 614 }
614 615
615 Page::PageClients::PageClients() 616 Page::PageClients::PageClients()
616 : chromeClient(nullptr) 617 : chromeClient(nullptr)
617 , contextMenuClient(nullptr) 618 , contextMenuClient(nullptr)
618 , editorClient(nullptr) 619 , editorClient(nullptr)
619 , dragClient(nullptr) 620 , dragClient(nullptr)
620 , inspectorClient(nullptr) 621 , inspectorClient(nullptr)
621 , spellCheckerClient(nullptr) 622 , spellCheckerClient(nullptr)
622 { 623 {
623 } 624 }
624 625
625 Page::PageClients::~PageClients() 626 Page::PageClients::~PageClients()
626 { 627 {
627 } 628 }
628 629
629 } // namespace blink 630 } // namespace blink
OLDNEW

Powered by Google App Engine