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

Side by Side Diff: third_party/WebKit/Source/core/testing/DictionaryTest.cpp

Issue 2616923002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Fix errors Created 3 years, 11 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/testing/DictionaryTest.h" 5 #include "core/testing/DictionaryTest.h"
6 6
7 #include "bindings/core/v8/ScriptState.h"
7 #include "bindings/core/v8/V8ObjectBuilder.h" 8 #include "bindings/core/v8/V8ObjectBuilder.h"
8 #include "core/testing/InternalDictionary.h" 9 #include "core/testing/InternalDictionary.h"
9 #include "core/testing/InternalDictionaryDerived.h" 10 #include "core/testing/InternalDictionaryDerived.h"
10 #include "core/testing/InternalDictionaryDerivedDerived.h" 11 #include "core/testing/InternalDictionaryDerivedDerived.h"
11 12
12 namespace blink { 13 namespace blink {
13 14
14 DictionaryTest::DictionaryTest() : m_requiredBooleanMember(false) {} 15 DictionaryTest::DictionaryTest() : m_requiredBooleanMember(false) {}
15 16
16 DictionaryTest::~DictionaryTest() {} 17 DictionaryTest::~DictionaryTest() {}
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 m_derivedDerivedStringMember = derived.derivedDerivedStringMember(); 159 m_derivedDerivedStringMember = derived.derivedDerivedStringMember();
159 } 160 }
160 161
161 void DictionaryTest::getDerivedDerived( 162 void DictionaryTest::getDerivedDerived(
162 InternalDictionaryDerivedDerived& result) { 163 InternalDictionaryDerivedDerived& result) {
163 getDerived(result); 164 getDerived(result);
164 result.setDerivedDerivedStringMember(m_derivedDerivedStringMember); 165 result.setDerivedDerivedStringMember(m_derivedDerivedStringMember);
165 } 166 }
166 167
167 String DictionaryTest::stringFromIterable( 168 String DictionaryTest::stringFromIterable(
168 ExecutionContext* executionContext, 169 ScriptState* scriptState,
169 Dictionary iterable, 170 Dictionary iterable,
170 ExceptionState& exceptionState) const { 171 ExceptionState& exceptionState) const {
171 StringBuilder result; 172 StringBuilder result;
173 ExecutionContext* executionContext = scriptState->getExecutionContext();
172 DictionaryIterator iterator = iterable.getIterator(executionContext); 174 DictionaryIterator iterator = iterable.getIterator(executionContext);
173 if (iterator.isNull()) 175 if (iterator.isNull())
174 return emptyString(); 176 return emptyString();
175 177
176 bool firstLoop = true; 178 bool firstLoop = true;
177 while (iterator.next(executionContext, exceptionState)) { 179 while (iterator.next(executionContext, exceptionState)) {
178 if (exceptionState.hadException()) 180 if (exceptionState.hadException())
179 return emptyString(); 181 return emptyString();
180 182
181 if (firstLoop) 183 if (firstLoop)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 226 }
225 227
226 DEFINE_TRACE(DictionaryTest) { 228 DEFINE_TRACE(DictionaryTest) {
227 visitor->trace(m_elementMember); 229 visitor->trace(m_elementMember);
228 visitor->trace(m_elementOrNullMember); 230 visitor->trace(m_elementOrNullMember);
229 visitor->trace(m_doubleOrStringSequenceMember); 231 visitor->trace(m_doubleOrStringSequenceMember);
230 visitor->trace(m_eventTargetOrNullMember); 232 visitor->trace(m_eventTargetOrNullMember);
231 } 233 }
232 234
233 } // namespace blink 235 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/DictionaryTest.h ('k') | third_party/WebKit/Source/core/testing/DictionaryTest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698