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

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

Issue 17225003: Support named query generation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 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
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (ec) { 243 if (ec) {
244 setDOMException(ec, info.GetIsolate()); 244 setDOMException(ec, info.GetIsolate());
245 return; 245 return;
246 } 246 }
247 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); 247 v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
248 for (size_t i = 0; i < names.size(); ++i) 248 for (size_t i = 0; i < names.size(); ++i)
249 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge tIsolate())); 249 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge tIsolate()));
250 v8SetReturnValue(info, v8names); 250 v8SetReturnValue(info, v8names);
251 } 251 }
252 252
253 void V8TestEventTarget::namedPropertyQuery(v8::Local<v8::String> name, const v8: :PropertyCallbackInfo<v8::Integer>& info)
254 {
255 TestEventTarget* collection = toNative(info.Holder());
256 AtomicString propertyName = toWebCoreAtomicString(name);
257 ExceptionCode ec = 0;
258 int returnValue = 0;
259 bool result = collection->namedPropertyQuery(propertyName, returnValue, ec);
260 if (ec) {
261 setDOMException(ec, info.GetIsolate());
262 return;
263 }
264 if (!result)
265 return;
266 v8SetReturnValueInt(info, 0);
267 }
268
253 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::H andle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType current WorldType) 269 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::H andle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType current WorldType)
254 { 270 {
255 desc->ReadOnlyPrototype(); 271 desc->ReadOnlyPrototype();
256 272
257 v8::Local<v8::Signature> defaultSignature; 273 v8::Local<v8::Signature> defaultSignature;
258 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar get", v8::Local<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCount, 274 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar get", v8::Local<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCount,
259 0, 0, 275 0, 0,
260 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is olate, currentWorldType); 276 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is olate, currentWorldType);
261 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. 277 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
262 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); 278 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 installPerContextProperties(wrapper, impl.get(), isolate); 338 installPerContextProperties(wrapper, impl.get(), isolate);
323 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap perConfiguration::Independent); 339 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap perConfiguration::Independent);
324 return wrapper; 340 return wrapper;
325 } 341 }
326 void V8TestEventTarget::derefObject(void* object) 342 void V8TestEventTarget::derefObject(void* object)
327 { 343 {
328 static_cast<TestEventTarget*>(object)->deref(); 344 static_cast<TestEventTarget*>(object)->deref();
329 } 345 }
330 346
331 } // namespace WebCore 347 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698