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

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

Issue 1004503004: IDL: Add support for serializer definitions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@V8ObjectBuilder
Patch Set: Created 5 years, 9 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 (partial2StaticVoidMethodMethodForPartialInterface)(info); 1897 (partial2StaticVoidMethodMethodForPartialInterface)(info);
1898 } 1898 }
1899 1899
1900 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1900 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1901 { 1901 {
1902 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1902 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1903 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); 1903 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
1904 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1904 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1905 } 1905 }
1906 1906
1907 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1908 {
1909 ExceptionState exceptionState(ExceptionState::ExecutionContext, "toJSON", "T estInterface", info.Holder(), info.GetIsolate());
1910 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1911 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
1912 ScriptValue result = impl->toJSONForBinding(scriptState, exceptionState);
1913 if (exceptionState.hadException()) {
1914 exceptionState.throwIfNeeded();
1915 return;
1916 }
1917 v8SetReturnValue(info, result.v8Value());
1918 }
1919
1920 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
1921 {
1922 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1923 TestInterfaceImplementationV8Internal::toJSONMethod(info);
1924 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1925 }
1926
1907 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1927 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1908 { 1928 {
1909 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1929 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1910 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); 1930 v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
1911 } 1931 }
1912 1932
1913 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 1933 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
1914 { 1934 {
1915 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1935 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1916 TestInterfaceImplementationV8Internal::toStringMethod(info); 1936 TestInterfaceImplementationV8Internal::toStringMethod(info);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 }; 2339 };
2320 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, staticVoidMethodPartialOverloadMethodConfiguration); 2340 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, staticVoidMethodPartialOverloadMethodConfiguration);
2321 const V8DOMConfiguration::MethodConfiguration staticPromiseMethodPartialOver loadMethodConfiguration = { 2341 const V8DOMConfiguration::MethodConfiguration staticPromiseMethodPartialOver loadMethodConfiguration = {
2322 "staticPromiseMethodPartialOverload", TestInterfaceImplementationV8Inter nal::staticPromiseMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration: :ExposedToAllScripts, 2342 "staticPromiseMethodPartialOverload", TestInterfaceImplementationV8Inter nal::staticPromiseMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration: :ExposedToAllScripts,
2323 }; 2343 };
2324 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, staticPromiseMethodPartialOverloadMethodConfiguration); 2344 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, staticPromiseMethodPartialOverloadMethodConfiguration);
2325 const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMethodMethod Configuration = { 2345 const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMethodMethod Configuration = {
2326 "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::parti al2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts , 2346 "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::parti al2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts ,
2327 }; 2347 };
2328 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, partial2StaticVoidMethodMethodConfiguration); 2348 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, partial2StaticVoidMethodMethodConfiguration);
2349 const V8DOMConfiguration::MethodConfiguration toJSONMethodConfiguration = {
2350 "toJSON", TestInterfaceImplementationV8Internal::toJSONMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts,
2351 };
2352 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toJSONMet hodConfiguration);
2329 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = { 2353 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = {
2330 "toString", TestInterfaceImplementationV8Internal::toStringMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 2354 "toString", TestInterfaceImplementationV8Internal::toStringMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
2331 }; 2355 };
2332 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM ethodConfiguration); 2356 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM ethodConfiguration);
2333 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttrib uteGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeA ttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyA ttribute>(v8::None), v8::Local<v8::AccessorSignature>(), static_cast<v8::AccessC ontrol>(v8::DEFAULT)); 2357 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttrib uteGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeA ttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyA ttribute>(v8::None), v8::Local<v8::AccessorSignature>(), static_cast<v8::AccessC ontrol>(v8::DEFAULT));
2334 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsS taticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSignatu re>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 2358 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsS taticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSignatu re>(), static_cast<v8::AccessControl>(v8::DEFAULT));
2335 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticS tringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im plementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSignatu re>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 2359 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticS tringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im plementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSignatu re>(), static_cast<v8::AccessControl>(v8::DEFAULT));
2336 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements2Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSign ature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 2360 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements2Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSign ature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
2337 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements3 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements3Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements3StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSign ature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 2361 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements3 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements3Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements3StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::AccessorSign ature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
2338 #if ENABLE(PARTIAL_CONDITION) 2362 #if ENABLE(PARTIAL_CONDITION)
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2544 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2568 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2545 { 2569 {
2546 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 2570 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2547 } 2571 }
2548 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2572 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2549 { 2573 {
2550 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 2574 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2551 } 2575 }
2552 } // namespace blink 2576 } // namespace blink
2553 #endif // ENABLE(CONDITION) 2577 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698