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

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

Issue 2146343002: Revert of Remove DOMWindowProperty::willDetachGlobalObjectFromFrame 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/DOMWindowProperty.h » ('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) 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();
2147 2149
2148 m_lifecycle.advanceTo(DocumentLifecycle::Stopping); 2150 m_lifecycle.advanceTo(DocumentLifecycle::Stopping);
2149 2151
2150 if (page()) 2152 if (page())
2151 page()->documentDetached(this); 2153 page()->documentDetached(this);
2152 InspectorInstrumentation::documentDetached(this); 2154 InspectorInstrumentation::documentDetached(this);
2153 2155
2154 if (m_frame->loader().client()->sharedWorkerRepositoryClient()) 2156 if (m_frame->loader().client()->sharedWorkerRepositoryClient())
2155 m_frame->loader().client()->sharedWorkerRepositoryClient()->documentDeta ched(this); 2157 m_frame->loader().client()->sharedWorkerRepositoryClient()->documentDeta ched(this);
2156 2158
(...skipping 3885 matching lines...) Expand 10 before | Expand all | Expand 10 after
6042 } 6044 }
6043 6045
6044 void showLiveDocumentInstances() 6046 void showLiveDocumentInstances()
6045 { 6047 {
6046 WeakDocumentSet& set = liveDocumentSet(); 6048 WeakDocumentSet& set = liveDocumentSet();
6047 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6049 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6048 for (Document* document : set) 6050 for (Document* document : set)
6049 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6051 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6050 } 6052 }
6051 #endif 6053 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/DOMWindowProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698