| Index: third_party/WebKit/Source/core/page/Page.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
|
| index 9f0f41c7b54da782a8403ff3ba28394b572689b2..b9f74b332f128663880703f66bfdcbcb035f15bd 100644
|
| --- a/third_party/WebKit/Source/core/page/Page.cpp
|
| +++ b/third_party/WebKit/Source/core/page/Page.cpp
|
| @@ -62,13 +62,13 @@ namespace blink {
|
| // Set of all live pages; includes internal Page objects that are
|
| // not observable from scripts.
|
| static Page::PageSet& allPages() {
|
| - DEFINE_STATIC_LOCAL(Page::PageSet, allPages, ());
|
| - return allPages;
|
| + DEFINE_STATIC_LOCAL(Page::PageSet, pages, ());
|
| + return pages;
|
| }
|
|
|
| Page::PageSet& Page::ordinaryPages() {
|
| - DEFINE_STATIC_LOCAL(Page::PageSet, ordinaryPages, ());
|
| - return ordinaryPages;
|
| + DEFINE_STATIC_LOCAL(Page::PageSet, pages, ());
|
| + return pages;
|
| }
|
|
|
| void Page::networkStateChanged(bool online) {
|
| @@ -149,6 +149,17 @@ Page::~Page() {
|
| ASSERT(!m_mainFrame);
|
| }
|
|
|
| +void Page::closeSoon() {
|
| + // Make sure this Page can no longer be found by JS.
|
| + m_isClosing = true;
|
| +
|
| + // TODO(dcheng): Try to remove this in a followup, it's not obviously needed.
|
| + if (m_mainFrame->isLocalFrame())
|
| + toLocalFrame(m_mainFrame)->loader().stopAllLoaders();
|
| +
|
| + chromeClient().closeWindowSoon();
|
| +}
|
| +
|
| ViewportDescription Page::viewportDescription() const {
|
| return mainFrame() && mainFrame()->isLocalFrame() &&
|
| deprecatedLocalMainFrame()->document()
|
| @@ -507,10 +518,6 @@ void Page::willCloseLayerTreeView(WebLayerTreeView& layerTreeView) {
|
| m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView);
|
| }
|
|
|
| -void Page::willBeClosed() {
|
| - ordinaryPages().remove(this);
|
| -}
|
| -
|
| void Page::willBeDestroyed() {
|
| Frame* mainFrame = m_mainFrame;
|
|
|
|
|