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

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

Issue 311803003: [oilpan]: Avoid refcounting QualifiedName's nullQName when tracing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/AnimationTimelineTest.cpp ('k') | Source/core/dom/Element.cpp » ('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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 if (!typeExtension.isEmpty()) 775 if (!typeExtension.isEmpty())
776 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element .get(), typeExtension); 776 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element .get(), typeExtension);
777 777
778 return element.release(); 778 return element.release();
779 } 779 }
780 780
781 static inline QualifiedName createQualifiedName(const AtomicString& namespaceURI , const AtomicString& qualifiedName, ExceptionState& exceptionState) 781 static inline QualifiedName createQualifiedName(const AtomicString& namespaceURI , const AtomicString& qualifiedName, ExceptionState& exceptionState)
782 { 782 {
783 AtomicString prefix, localName; 783 AtomicString prefix, localName;
784 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio nState)) 784 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio nState))
785 return nullQName(); 785 return QualifiedName::null();
786 786
787 QualifiedName qName(prefix, localName, namespaceURI); 787 QualifiedName qName(prefix, localName, namespaceURI);
788 if (!Document::hasValidNamespaceForElements(qName)) { 788 if (!Document::hasValidNamespaceForElements(qName)) {
789 exceptionState.throwDOMException(NamespaceError, "The namespace URI prov ided ('" + namespaceURI + "') is not valid for the qualified name provided ('" + qualifiedName + "')."); 789 exceptionState.throwDOMException(NamespaceError, "The namespace URI prov ided ('" + namespaceURI + "') is not valid for the qualified name provided ('" + qualifiedName + "').");
790 return nullQName(); 790 return QualifiedName::null();
791 } 791 }
792 792
793 return qName; 793 return qName;
794 } 794 }
795 795
796 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na mespaceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState) 796 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na mespaceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState)
797 { 797 {
798 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti onState)); 798 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti onState));
799 if (qName == nullQName()) 799 if (qName == QualifiedName::null())
800 return nullptr; 800 return nullptr;
801 801
802 return createElement(qName, false); 802 return createElement(qName, false);
803 } 803 }
804 804
805 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na mespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension , ExceptionState& exceptionState) 805 PassRefPtrWillBeRawPtr<Element> Document::createElementNS(const AtomicString& na mespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension , ExceptionState& exceptionState)
806 { 806 {
807 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti onState)); 807 QualifiedName qName(createQualifiedName(namespaceURI, qualifiedName, excepti onState));
808 if (qName == nullQName()) 808 if (qName == QualifiedName::null())
809 return nullptr; 809 return nullptr;
810 810
811 RefPtrWillBeRawPtr<Element> element; 811 RefPtrWillBeRawPtr<Element> element;
812 if (CustomElement::isValidName(qName.localName()) && registrationContext()) 812 if (CustomElement::isValidName(qName.localName()) && registrationContext())
813 element = registrationContext()->createCustomTagElement(*this, qName); 813 element = registrationContext()->createCustomTagElement(*this, qName);
814 else 814 else
815 element = createElement(qName, false); 815 element = createElement(qName, false);
816 816
817 if (!typeExtension.isEmpty()) 817 if (!typeExtension.isEmpty())
818 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element .get(), typeExtension); 818 CustomElementRegistrationContext::setIsAttributeAndTypeExtension(element .get(), typeExtension);
(...skipping 5036 matching lines...) Expand 10 before | Expand all | Expand 10 after
5855 visitor->trace(m_compositorPendingAnimations); 5855 visitor->trace(m_compositorPendingAnimations);
5856 visitor->trace(m_contextDocument); 5856 visitor->trace(m_contextDocument);
5857 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); 5857 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this);
5858 DocumentSupplementable::trace(visitor); 5858 DocumentSupplementable::trace(visitor);
5859 TreeScope::trace(visitor); 5859 TreeScope::trace(visitor);
5860 ContainerNode::trace(visitor); 5860 ContainerNode::trace(visitor);
5861 ExecutionContext::trace(visitor); 5861 ExecutionContext::trace(visitor);
5862 } 5862 }
5863 5863
5864 } // namespace WebCore 5864 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationTimelineTest.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698