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

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

Issue 17225003: Support named query generation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: remove int returnValue and hard code v8::None 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 if (ec) { 586 if (ec) {
587 setDOMException(ec, info.GetIsolate()); 587 setDOMException(ec, info.GetIsolate());
588 return; 588 return;
589 } 589 }
590 v8::Handle<v8::Array> v8names = v8::Array::New(names.size()); 590 v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
591 for (size_t i = 0; i < names.size(); ++i) 591 for (size_t i = 0; i < names.size(); ++i)
592 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge tIsolate())); 592 v8names->Set(v8Integer(i, info.GetIsolate()), v8String(names[i], info.Ge tIsolate()));
593 v8SetReturnValue(info, v8names); 593 v8SetReturnValue(info, v8names);
594 } 594 }
595 595
596 void V8TestInterface::namedPropertyQuery(v8::Local<v8::String> name, const v8::P ropertyCallbackInfo<v8::Integer>& info)
597 {
598 TestInterface* collection = toNative(info.Holder());
599 AtomicString propertyName = toWebCoreAtomicString(name);
600 ExceptionCode ec = 0;
601 int returnValue = 0;
602 bool result = collection->namedPropertyQuery(propertyName, returnValue, ec);
603 if (ec) {
604 setDOMException(ec, info.GetIsolate());
605 return;
606 }
607 if (!result)
608 return;
609 v8SetReturnValueInt(info, 0);
610 }
611
596 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Han dle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWo rldType) 612 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Han dle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWo rldType)
597 { 613 {
598 desc->ReadOnlyPrototype(); 614 desc->ReadOnlyPrototype();
599 615
600 v8::Local<v8::Signature> defaultSignature; 616 v8::Local<v8::Signature> defaultSignature;
601 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestInterfac e", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount, 617 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestInterfac e", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount,
602 V8TestInterfaceAttrs, WTF_ARRAY_LENGTH(V8TestInterfaceAttrs), 618 V8TestInterfaceAttrs, WTF_ARRAY_LENGTH(V8TestInterfaceAttrs),
603 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolat e, currentWorldType); 619 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolat e, currentWorldType);
604 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. 620 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
605 desc->SetCallHandler(V8TestInterface::constructorCallback); 621 desc->SetCallHandler(V8TestInterface::constructorCallback);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 return wrapper; 722 return wrapper;
707 } 723 }
708 void V8TestInterface::derefObject(void* object) 724 void V8TestInterface::derefObject(void* object)
709 { 725 {
710 static_cast<TestInterface*>(object)->deref(); 726 static_cast<TestInterface*>(object)->deref();
711 } 727 }
712 728
713 } // namespace WebCore 729 } // namespace WebCore
714 730
715 #endif // ENABLE(Condition1) || ENABLE(Condition2) 731 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestEventTarget.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698