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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2138003002: Remove DOMWindowProperty::willDetachGlobalObjectFromFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 // message loops. 2137 // message loops.
2138 FrameNavigationDisabler navigationDisabler(*m_frame); 2138 FrameNavigationDisabler navigationDisabler(*m_frame);
2139 // Defer widget updates to avoid plugins trying to run script inside ScriptF orbiddenScope, 2139 // Defer widget updates to avoid plugins trying to run script inside ScriptF orbiddenScope,
2140 // which will crash the renderer after https://crrev.com/200984 2140 // which will crash the renderer after https://crrev.com/200984
2141 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; 2141 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates;
2142 // Don't allow script to run in the middle of detach() because a detaching D ocument is not in a 2142 // Don't allow script to run in the middle of detach() because a detaching D ocument is not in a
2143 // consistent state. 2143 // consistent state.
2144 ScriptForbiddenScope forbidScript; 2144 ScriptForbiddenScope forbidScript;
2145 view()->dispose(); 2145 view()->dispose();
2146 m_markers->prepareForDestruction(); 2146 m_markers->prepareForDestruction();
2147 if (LocalDOMWindow* window = this->domWindow())
2148 window->willDetachDocumentFromFrame();
2149 2147
2150 m_lifecycle.advanceTo(DocumentLifecycle::Stopping); 2148 m_lifecycle.advanceTo(DocumentLifecycle::Stopping);
2151 2149
2152 if (page()) 2150 if (page())
2153 page()->documentDetached(this); 2151 page()->documentDetached(this);
2154 InspectorInstrumentation::documentDetached(this); 2152 InspectorInstrumentation::documentDetached(this);
2155 2153
2156 if (m_frame->loader().client()->sharedWorkerRepositoryClient()) 2154 if (m_frame->loader().client()->sharedWorkerRepositoryClient())
2157 m_frame->loader().client()->sharedWorkerRepositoryClient()->documentDeta ched(this); 2155 m_frame->loader().client()->sharedWorkerRepositoryClient()->documentDeta ched(this);
2158 2156
(...skipping 3885 matching lines...) Expand 10 before | Expand all | Expand 10 after
6044 } 6042 }
6045 6043
6046 void showLiveDocumentInstances() 6044 void showLiveDocumentInstances()
6047 { 6045 {
6048 WeakDocumentSet& set = liveDocumentSet(); 6046 WeakDocumentSet& set = liveDocumentSet();
6049 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6047 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6050 for (Document* document : set) 6048 for (Document* document : set)
6051 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6049 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6052 } 6050 }
6053 #endif 6051 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698