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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp

Issue 99333017: IDL compiler: simplify type conversion in Event Constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test result (error text) Created 7 years 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/bindings/tests/results/V8TestExtendedEvent.cpp ('k') | Source/bindings/v8/Dictionary.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 {"implementedAsInitializedByEventConstructorReadonlyStringAttribute", TestIn terfaceEventConstructorV8Internal::implementedAsInitializedByEventConstructorRea donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on inst ance */}, 198 {"implementedAsInitializedByEventConstructorReadonlyStringAttribute", TestIn terfaceEventConstructorV8Internal::implementedAsInitializedByEventConstructorRea donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on inst ance */},
199 {"deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttribut e", TestInterfaceEventConstructorV8Internal::deprecatedImplementedAsInitializedB yEventConstructorReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */}, 199 {"deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttribut e", TestInterfaceEventConstructorV8Internal::deprecatedImplementedAsInitializedB yEventConstructorReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */},
200 }; 200 };
201 201
202 bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit& eventInit, const Dictionary& options, ExceptionState& exceptionState, const Stri ng& forEventName) 202 bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit& eventInit, const Dictionary& options, ExceptionState& exceptionState, const Stri ng& forEventName)
203 { 203 {
204 Dictionary::ConversionContext conversionContext(forEventName.isEmpty() ? Str ing("TestInterfaceEventConstructor") : forEventName, "", exceptionState); 204 Dictionary::ConversionContext conversionContext(forEventName.isEmpty() ? Str ing("TestInterfaceEventConstructor") : forEventName, "", exceptionState);
205 if (!initializeEvent(eventInit, options, exceptionState, forEventName.isEmpt y() ? String("TestInterfaceEventConstructor") : forEventName)) 205 if (!initializeEvent(eventInit, options, exceptionState, forEventName.isEmpt y() ? String("TestInterfaceEventConstructor") : forEventName))
206 return false; 206 return false;
207 207
208 if (!options.convert(conversionContext, "initializedByEventConstructorReadon lyStringAttribute", eventInit.initializedByEventConstructorReadonlyStringAttribu te)) 208 if (!options.convert(conversionContext.setConversionType("DOMString", false) , "initializedByEventConstructorReadonlyStringAttribute", eventInit.initializedB yEventConstructorReadonlyStringAttribute))
209 return false; 209 return false;
210 if (options.convert(conversionContext, "deprecatedInitializedByEventConstruc torReadonlyStringAttribute", eventInit.deprecatedInitializedByEventConstructorRe adonlyStringAttribute)) { 210 if (options.convert(conversionContext.setConversionType("DOMString", false), "deprecatedInitializedByEventConstructorReadonlyStringAttribute", eventInit.dep recatedInitializedByEventConstructorReadonlyStringAttribute)) {
211 if (options.hasProperty("deprecatedInitializedByEventConstructorReadonly StringAttribute")) 211 if (options.hasProperty("deprecatedInitializedByEventConstructorReadonly StringAttribute"))
212 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::i nitializedByEventConstructorReadonlyStringAttribute); 212 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::i nitializedByEventConstructorReadonlyStringAttribute);
213 } else { 213 } else {
214 return false; 214 return false;
215 } 215 }
216 if (!options.convert(conversionContext, "implementedAsInitializedByEventCons tructorReadonlyStringAttribute", eventInit.implementedAsName)) 216 if (!options.convert(conversionContext.setConversionType("DOMString", false) , "implementedAsInitializedByEventConstructorReadonlyStringAttribute", eventInit .implementedAsName))
217 return false; 217 return false;
218 if (options.convert(conversionContext, "deprecatedImplementedAsInitializedBy EventConstructorReadonlyStringAttribute", eventInit.deprecatedImplementedAsName) ) { 218 if (options.convert(conversionContext.setConversionType("DOMString", false), "deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAttribute", eventInit.deprecatedImplementedAsName)) {
219 if (options.hasProperty("deprecatedImplementedAsInitializedByEventConstr uctorReadonlyStringAttribute")) 219 if (options.hasProperty("deprecatedImplementedAsInitializedByEventConstr uctorReadonlyStringAttribute"))
220 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::i nitializedByEventConstructorReadonlyStringAttribute); 220 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::i nitializedByEventConstructorReadonlyStringAttribute);
221 } else { 221 } else {
222 return false; 222 return false;
223 } 223 }
224 return true; 224 return true;
225 } 225 }
226 226
227 void V8TestInterfaceEventConstructor::constructorCallback(const v8::FunctionCall backInfo<v8::Value>& info) 227 void V8TestInterfaceEventConstructor::constructorCallback(const v8::FunctionCall backInfo<v8::Value>& info)
228 { 228 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 fromInternalPointer(object)->deref(); 312 fromInternalPointer(object)->deref();
313 } 313 }
314 314
315 template<> 315 template<>
316 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 316 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
317 { 317 {
318 return toV8(impl, creationContext, isolate); 318 return toV8(impl, creationContext, isolate);
319 } 319 }
320 320
321 } // namespace WebCore 321 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestExtendedEvent.cpp ('k') | Source/bindings/v8/Dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698