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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGElement.cpp

Issue 2694283003: Annotate ScriptWrappable-embedding singletons.
Patch Set: add XPathValue singleton Created 3 years, 10 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) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 if (!hasSVGRareData()) 624 if (!hasSVGRareData())
625 return; 625 return;
626 626
627 HeapHashSet<WeakMember<SVGElement>>& instances = 627 HeapHashSet<WeakMember<SVGElement>>& instances =
628 svgRareData()->elementInstances(); 628 svgRareData()->elementInstances();
629 629
630 instances.remove(instance); 630 instances.remove(instance);
631 } 631 }
632 632
633 static HeapHashSet<WeakMember<SVGElement>>& emptyInstances() { 633 static HeapHashSet<WeakMember<SVGElement>>& emptyInstances() {
634 ALLOW_UNSAFE_SINGLETON()
634 DEFINE_STATIC_LOCAL(HeapHashSet<WeakMember<SVGElement>>, emptyInstances, 635 DEFINE_STATIC_LOCAL(HeapHashSet<WeakMember<SVGElement>>, emptyInstances,
635 (new HeapHashSet<WeakMember<SVGElement>>)); 636 (new HeapHashSet<WeakMember<SVGElement>>));
636 return emptyInstances; 637 return emptyInstances;
637 } 638 }
638 639
639 const HeapHashSet<WeakMember<SVGElement>>& SVGElement::instancesForElement() 640 const HeapHashSet<WeakMember<SVGElement>>& SVGElement::instancesForElement()
640 const { 641 const {
641 if (!hasSVGRareData()) 642 if (!hasSVGRareData())
642 return emptyInstances(); 643 return emptyInstances();
643 return svgRareData()->elementInstances(); 644 return svgRareData()->elementInstances();
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 visitor->trace(m_className); 1301 visitor->trace(m_className);
1301 Element::trace(visitor); 1302 Element::trace(visitor);
1302 } 1303 }
1303 1304
1304 const AtomicString& SVGElement::eventParameterName() { 1305 const AtomicString& SVGElement::eventParameterName() {
1305 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); 1306 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt"));
1306 return evtString; 1307 return evtString;
1307 } 1308 }
1308 1309
1309 } // namespace blink 1310 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/Page.cpp ('k') | third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698