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

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

Issue 298863010: Oilpan: have PendingScripts trace their script elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Trace HTMLScriptRunnerHost from HTMLScriptRunner Created 6 years, 6 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 | « Source/core/dom/Document.h ('k') | Source/core/dom/PendingScript.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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 #if !ENABLE(OILPAN) 534 #if !ENABLE(OILPAN)
535 ASSERT(!hasGuardRefCount()); 535 ASSERT(!hasGuardRefCount());
536 // With Oilpan, either the document outlives the visibility observers 536 // With Oilpan, either the document outlives the visibility observers
537 // or the visibility observers and the document die in the same GC round. 537 // or the visibility observers and the document die in the same GC round.
538 // When they die in the same GC round, the list of visibility observers 538 // When they die in the same GC round, the list of visibility observers
539 // will not be empty on Document destruction. 539 // will not be empty on Document destruction.
540 ASSERT(m_visibilityObservers.isEmpty()); 540 ASSERT(m_visibilityObservers.isEmpty());
541 541
542 if (m_templateDocument) 542 if (m_templateDocument)
543 m_templateDocument->m_templateDocumentHost = nullptr; // balanced in ens ureTemplateDocument(). 543 m_templateDocument->m_templateDocumentHost = nullptr; // balanced in ens ureTemplateDocument().
544 #endif
545 544
546 m_scriptRunner.clear(); 545 m_scriptRunner.clear();
547 546
548 // FIXME: Oilpan: Not removing event listeners here also means that we do 547 // FIXME: Oilpan: Not removing event listeners here also means that we do
549 // not notify the inspector instrumentation that the event listeners are 548 // not notify the inspector instrumentation that the event listeners are
550 // gone. The Document and all the nodes in the document are gone, so maybe 549 // gone. The Document and all the nodes in the document are gone, so maybe
551 // that is OK? 550 // that is OK?
552 #if !ENABLE(OILPAN)
553 removeAllEventListenersRecursively(); 551 removeAllEventListenersRecursively();
554 552
555 // Currently we believe that Document can never outlive the parser. 553 // Currently we believe that Document can never outlive the parser.
556 // Although the Document may be replaced synchronously, DocumentParsers 554 // Although the Document may be replaced synchronously, DocumentParsers
557 // generally keep at least one reference to an Element which would in turn 555 // generally keep at least one reference to an Element which would in turn
558 // has a reference to the Document. If you hit this ASSERT, then that 556 // has a reference to the Document. If you hit this ASSERT, then that
559 // assumption is wrong. DocumentParser::detach() should ensure that even 557 // assumption is wrong. DocumentParser::detach() should ensure that even
560 // if the DocumentParser outlives the Document it won't cause badness. 558 // if the DocumentParser outlives the Document it won't cause badness.
561 ASSERT(!m_parser || m_parser->refCount() == 1); 559 ASSERT(!m_parser || m_parser->refCount() == 1);
562 detachParser(); 560 detachParser();
(...skipping 5204 matching lines...) Expand 10 before | Expand all | Expand 10 after
5767 visitor->trace(m_docType); 5765 visitor->trace(m_docType);
5768 visitor->trace(m_implementation); 5766 visitor->trace(m_implementation);
5769 visitor->trace(m_autofocusElement); 5767 visitor->trace(m_autofocusElement);
5770 visitor->trace(m_focusedElement); 5768 visitor->trace(m_focusedElement);
5771 visitor->trace(m_hoverNode); 5769 visitor->trace(m_hoverNode);
5772 visitor->trace(m_activeHoverElement); 5770 visitor->trace(m_activeHoverElement);
5773 visitor->trace(m_documentElement); 5771 visitor->trace(m_documentElement);
5774 visitor->trace(m_titleElement); 5772 visitor->trace(m_titleElement);
5775 visitor->trace(m_markers); 5773 visitor->trace(m_markers);
5776 visitor->trace(m_currentScriptStack); 5774 visitor->trace(m_currentScriptStack);
5775 visitor->trace(m_scriptRunner);
5777 visitor->trace(m_transformSourceDocument); 5776 visitor->trace(m_transformSourceDocument);
5778 visitor->trace(m_listsInvalidatedAtDocument); 5777 visitor->trace(m_listsInvalidatedAtDocument);
5779 #if ENABLE(OILPAN) 5778 #if ENABLE(OILPAN)
5780 for (int i = 0; i < numNodeListInvalidationTypes; ++i) 5779 for (int i = 0; i < numNodeListInvalidationTypes; ++i)
5781 visitor->trace(m_nodeLists[i]); 5780 visitor->trace(m_nodeLists[i]);
5782 #endif 5781 #endif
5783 visitor->trace(m_cssCanvasElements); 5782 visitor->trace(m_cssCanvasElements);
5784 visitor->trace(m_topLayerElements); 5783 visitor->trace(m_topLayerElements);
5785 visitor->trace(m_elemSheet); 5784 visitor->trace(m_elemSheet);
5786 visitor->trace(m_nodeIterators); 5785 visitor->trace(m_nodeIterators);
(...skipping 15 matching lines...) Expand all
5802 visitor->trace(m_timeline); 5801 visitor->trace(m_timeline);
5803 visitor->trace(m_compositorPendingAnimations); 5802 visitor->trace(m_compositorPendingAnimations);
5804 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); 5803 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
5805 DocumentSupplementable::trace(visitor); 5804 DocumentSupplementable::trace(visitor);
5806 TreeScope::trace(visitor); 5805 TreeScope::trace(visitor);
5807 ContainerNode::trace(visitor); 5806 ContainerNode::trace(visitor);
5808 ExecutionContext::trace(visitor); 5807 ExecutionContext::trace(visitor);
5809 } 5808 }
5810 5809
5811 } // namespace WebCore 5810 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/PendingScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698