OLD | NEW |
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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 void Document::Shutdown() { | 2504 void Document::Shutdown() { |
2505 TRACE_EVENT0("blink", "Document::shutdown"); | 2505 TRACE_EVENT0("blink", "Document::shutdown"); |
2506 CHECK(!frame_ || frame_->Tree().ChildCount() == 0); | 2506 CHECK(!frame_ || frame_->Tree().ChildCount() == 0); |
2507 if (!IsActive()) | 2507 if (!IsActive()) |
2508 return; | 2508 return; |
2509 | 2509 |
2510 // Frame navigation can cause a new Document to be attached. Don't allow that, | 2510 // Frame navigation can cause a new Document to be attached. Don't allow that, |
2511 // since that will cause a situation where LocalFrame still has a Document | 2511 // since that will cause a situation where LocalFrame still has a Document |
2512 // attached after this finishes! Normally, it shouldn't actually be possible | 2512 // attached after this finishes! Normally, it shouldn't actually be possible |
2513 // to trigger navigation here. However, plugins (see below) can cause lots of | 2513 // to trigger navigation here. However, plugins (see below) can cause lots of |
2514 // crazy things to happen, since plugin detach involves nested message loops. | 2514 // crazy things to happen, since plugin detach involves nested run loops. |
2515 FrameNavigationDisabler navigation_disabler(*frame_); | 2515 FrameNavigationDisabler navigation_disabler(*frame_); |
2516 // Defer FrameViewBase updates to avoid plugins trying to run script inside | 2516 // Defer FrameViewBase updates to avoid plugins trying to run script inside |
2517 // ScriptForbiddenScope, which will crash the renderer after | 2517 // ScriptForbiddenScope, which will crash the renderer after |
2518 // https://crrev.com/200984 | 2518 // https://crrev.com/200984 |
2519 HTMLFrameOwnerElement::UpdateSuspendScope | 2519 HTMLFrameOwnerElement::UpdateSuspendScope |
2520 suspend_frame_view_base_hierarchy_updates; | 2520 suspend_frame_view_base_hierarchy_updates; |
2521 // Don't allow script to run in the middle of detachLayoutTree() because a | 2521 // Don't allow script to run in the middle of detachLayoutTree() because a |
2522 // detaching Document is not in a consistent state. | 2522 // detaching Document is not in a consistent state. |
2523 ScriptForbiddenScope forbid_script; | 2523 ScriptForbiddenScope forbid_script; |
2524 | 2524 |
(...skipping 4256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6781 } | 6781 } |
6782 | 6782 |
6783 void showLiveDocumentInstances() { | 6783 void showLiveDocumentInstances() { |
6784 WeakDocumentSet& set = liveDocumentSet(); | 6784 WeakDocumentSet& set = liveDocumentSet(); |
6785 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6785 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6786 for (blink::Document* document : set) | 6786 for (blink::Document* document : set) |
6787 fprintf(stderr, "- Document %p URL: %s\n", document, | 6787 fprintf(stderr, "- Document %p URL: %s\n", document, |
6788 document->Url().GetString().Utf8().data()); | 6788 document->Url().GetString().Utf8().data()); |
6789 } | 6789 } |
6790 #endif | 6790 #endif |
OLD | NEW |