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

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

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 const V0CustomElementDescriptor descriptor(type, tagName.namespaceURI(), 93 const V0CustomElementDescriptor descriptor(type, tagName.namespaceURI(),
94 tagName.localName()); 94 tagName.localName());
95 V0CustomElementDefinition* definition = 95 V0CustomElementDefinition* definition =
96 V0CustomElementDefinition::create(descriptor, lifecycleCallbacks); 96 V0CustomElementDefinition::create(descriptor, lifecycleCallbacks);
97 97
98 if (!constructorBuilder->createConstructor(document, definition, 98 if (!constructorBuilder->createConstructor(document, definition,
99 exceptionState)) 99 exceptionState))
100 return 0; 100 return 0;
101 101
102 m_definitions.add(descriptor, definition); 102 m_definitions.insert(descriptor, definition);
103 m_registeredTypeNames.insert(descriptor.type()); 103 m_registeredTypeNames.insert(descriptor.type());
104 104
105 if (!constructorBuilder->didRegisterDefinition()) { 105 if (!constructorBuilder->didRegisterDefinition()) {
106 V0CustomElementException::throwException( 106 V0CustomElementException::throwException(
107 V0CustomElementException::ContextDestroyedRegisteringDefinition, type, 107 V0CustomElementException::ContextDestroyedRegisteringDefinition, type,
108 exceptionState); 108 exceptionState);
109 return 0; 109 return 0;
110 } 110 }
111 111
112 return definition; 112 return definition;
(...skipping 16 matching lines...) Expand all
129 bool V0CustomElementRegistry::v1NameIsDefined(const AtomicString& name) const { 129 bool V0CustomElementRegistry::v1NameIsDefined(const AtomicString& name) const {
130 return m_v1.get() && m_v1->nameIsDefined(name); 130 return m_v1.get() && m_v1->nameIsDefined(name);
131 } 131 }
132 132
133 DEFINE_TRACE(V0CustomElementRegistry) { 133 DEFINE_TRACE(V0CustomElementRegistry) {
134 visitor->trace(m_definitions); 134 visitor->trace(m_definitions);
135 visitor->trace(m_v1); 135 visitor->trace(m_v1);
136 } 136 }
137 137
138 } // namespace blink 138 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698