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

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

Issue 577303002: IDL: Support [DeprecateAs] and [MeasureAs] on constants (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: refactoring a little Created 6 years, 3 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 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h . 74 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h .
75 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 75 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
76 // bindings/core/v8/ScriptWrappable.h. 76 // bindings/core/v8/ScriptWrappable.h.
77 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType Info; 77 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType Info;
78 78
79 namespace TestObjectV8Internal { 79 namespace TestObjectV8Internal {
80 80
81 template <typename T> void V8_USE(T) { } 81 template <typename T> void V8_USE(T) { }
82 82
83 static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info)
84 {
85 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
86 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::Constant);
87 v8SetReturnValueInt(info, 1);
88 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
89 }
90
91 static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
92 {
93 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
94 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Co nstant);
95 v8SetReturnValueInt(info, 1);
96 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
97 }
98
83 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 99 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
84 { 100 {
85 v8::Handle<v8::Object> holder = info.Holder(); 101 v8::Handle<v8::Object> holder = info.Holder();
86 TestObject* impl = V8TestObject::toImpl(holder); 102 TestObject* impl = V8TestObject::toImpl(holder);
87 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() ); 103 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() );
88 } 104 }
89 105
90 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 106 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
91 { 107 {
92 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 108 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
(...skipping 10332 matching lines...) Expand 10 before | Expand all | Expand 10 after
10425 {"CONST_VALUE_16", -0x1A, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned Short}, 10441 {"CONST_VALUE_16", -0x1A, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned Short},
10426 {"CONST_VALUE_17", -0X1a, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned Short}, 10442 {"CONST_VALUE_17", -0X1a, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned Short},
10427 {"CONST_VALUE_18", 0, 0.123, 0, V8DOMConfiguration::ConstantTypeDouble}, 10443 {"CONST_VALUE_18", 0, 0.123, 0, V8DOMConfiguration::ConstantTypeDouble},
10428 {"CONST_VALUE_19", 0, 4e9, 0, V8DOMConfiguration::ConstantTypeDouble}, 10444 {"CONST_VALUE_19", 0, 4e9, 0, V8DOMConfiguration::ConstantTypeDouble},
10429 {"CONST_VALUE_20", 0, 3.4e5, 0, V8DOMConfiguration::ConstantTypeDouble}, 10445 {"CONST_VALUE_20", 0, 3.4e5, 0, V8DOMConfiguration::ConstantTypeDouble},
10430 {"CONST_VALUE_21", 0, -1.3, 0, V8DOMConfiguration::ConstantTypeDouble}, 10446 {"CONST_VALUE_21", 0, -1.3, 0, V8DOMConfiguration::ConstantTypeDouble},
10431 {"CONST_VALUE_22", 0, -4e-9, 0, V8DOMConfiguration::ConstantTypeDouble}, 10447 {"CONST_VALUE_22", 0, -4e-9, 0, V8DOMConfiguration::ConstantTypeDouble},
10432 {"CONST_VALUE_23", 0, .123, 0, V8DOMConfiguration::ConstantTypeDouble}, 10448 {"CONST_VALUE_23", 0, .123, 0, V8DOMConfiguration::ConstantTypeDouble},
10433 {"CONST_VALUE_24", 0, 5E+4, 0, V8DOMConfiguration::ConstantTypeDouble}, 10449 {"CONST_VALUE_24", 0, 5E+4, 0, V8DOMConfiguration::ConstantTypeDouble},
10434 {"CONST_VALUE_25", 0, 1, 0, V8DOMConfiguration::ConstantTypeFloat}, 10450 {"CONST_VALUE_25", 0, 1, 0, V8DOMConfiguration::ConstantTypeFloat},
10435 {"DEPRECATED_CONSTANT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
10436 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 10451 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
10437 }; 10452 };
10438 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants), isolate); 10453 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants), isolate);
10439 if (RuntimeEnabledFeatures::featureNameEnabled()) { 10454 if (RuntimeEnabledFeatures::featureNameEnabled()) {
10440 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort} ; 10455 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort} ;
10441 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate); 10456 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate);
10442 } 10457 }
10458 V8DOMConfiguration::installConstant(functionTemplate, prototypeTemplate, "DE PRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANTConstantGetterCallb ack, isolate);
10459 V8DOMConfiguration::installConstant(functionTemplate, prototypeTemplate, "ME ASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTConstantGetterCallback, isolate);
10443 COMPILE_ASSERT(0 == TestObject::CONST_VALUE_0, TheValueOfTestObject_CONST_VA LUE_0DoesntMatchWithImplementation); 10460 COMPILE_ASSERT(0 == TestObject::CONST_VALUE_0, TheValueOfTestObject_CONST_VA LUE_0DoesntMatchWithImplementation);
10444 COMPILE_ASSERT(1 == TestObject::CONST_VALUE_1, TheValueOfTestObject_CONST_VA LUE_1DoesntMatchWithImplementation); 10461 COMPILE_ASSERT(1 == TestObject::CONST_VALUE_1, TheValueOfTestObject_CONST_VA LUE_1DoesntMatchWithImplementation);
10445 COMPILE_ASSERT(2 == TestObject::CONST_VALUE_2, TheValueOfTestObject_CONST_VA LUE_2DoesntMatchWithImplementation); 10462 COMPILE_ASSERT(2 == TestObject::CONST_VALUE_2, TheValueOfTestObject_CONST_VA LUE_2DoesntMatchWithImplementation);
10446 COMPILE_ASSERT(4 == TestObject::CONST_VALUE_4, TheValueOfTestObject_CONST_VA LUE_4DoesntMatchWithImplementation); 10463 COMPILE_ASSERT(4 == TestObject::CONST_VALUE_4, TheValueOfTestObject_CONST_VA LUE_4DoesntMatchWithImplementation);
10447 COMPILE_ASSERT(8 == TestObject::CONST_VALUE_8, TheValueOfTestObject_CONST_VA LUE_8DoesntMatchWithImplementation); 10464 COMPILE_ASSERT(8 == TestObject::CONST_VALUE_8, TheValueOfTestObject_CONST_VA LUE_8DoesntMatchWithImplementation);
10448 COMPILE_ASSERT(-1 == TestObject::CONST_VALUE_9, TheValueOfTestObject_CONST_V ALUE_9DoesntMatchWithImplementation); 10465 COMPILE_ASSERT(-1 == TestObject::CONST_VALUE_9, TheValueOfTestObject_CONST_V ALUE_9DoesntMatchWithImplementation);
10449 COMPILE_ASSERT(0xffffffff == TestObject::CONST_VALUE_11, TheValueOfTestObjec t_CONST_VALUE_11DoesntMatchWithImplementation); 10466 COMPILE_ASSERT(0xffffffff == TestObject::CONST_VALUE_11, TheValueOfTestObjec t_CONST_VALUE_11DoesntMatchWithImplementation);
10450 COMPILE_ASSERT(0x01 == TestObject::CONST_VALUE_12, TheValueOfTestObject_CONS T_VALUE_12DoesntMatchWithImplementation); 10467 COMPILE_ASSERT(0x01 == TestObject::CONST_VALUE_12, TheValueOfTestObject_CONS T_VALUE_12DoesntMatchWithImplementation);
10451 COMPILE_ASSERT(0X20 == TestObject::CONST_VALUE_13, TheValueOfTestObject_CONS T_VALUE_13DoesntMatchWithImplementation); 10468 COMPILE_ASSERT(0X20 == TestObject::CONST_VALUE_13, TheValueOfTestObject_CONS T_VALUE_13DoesntMatchWithImplementation);
10452 COMPILE_ASSERT(0x1abc == TestObject::CONST_VALUE_14, TheValueOfTestObject_CO NST_VALUE_14DoesntMatchWithImplementation); 10469 COMPILE_ASSERT(0x1abc == TestObject::CONST_VALUE_14, TheValueOfTestObject_CO NST_VALUE_14DoesntMatchWithImplementation);
10453 COMPILE_ASSERT(010 == TestObject::CONST_VALUE_15, TheValueOfTestObject_CONST _VALUE_15DoesntMatchWithImplementation); 10470 COMPILE_ASSERT(010 == TestObject::CONST_VALUE_15, TheValueOfTestObject_CONST _VALUE_15DoesntMatchWithImplementation);
10454 COMPILE_ASSERT(-010 == TestObject::CONST_VALUE_16, TheValueOfTestObject_CONS T_VALUE_16DoesntMatchWithImplementation); 10471 COMPILE_ASSERT(-010 == TestObject::CONST_VALUE_16, TheValueOfTestObject_CONS T_VALUE_16DoesntMatchWithImplementation);
10455 COMPILE_ASSERT(-0x1A == TestObject::CONST_VALUE_16, TheValueOfTestObject_CON ST_VALUE_16DoesntMatchWithImplementation); 10472 COMPILE_ASSERT(-0x1A == TestObject::CONST_VALUE_16, TheValueOfTestObject_CON ST_VALUE_16DoesntMatchWithImplementation);
10456 COMPILE_ASSERT(-0X1a == TestObject::CONST_VALUE_17, TheValueOfTestObject_CON ST_VALUE_17DoesntMatchWithImplementation); 10473 COMPILE_ASSERT(-0X1a == TestObject::CONST_VALUE_17, TheValueOfTestObject_CON ST_VALUE_17DoesntMatchWithImplementation);
10457 COMPILE_ASSERT(1 == TestObject::DEPRECATED_CONSTANT, TheValueOfTestObject_DE PRECATED_CONSTANTDoesntMatchWithImplementation); 10474 COMPILE_ASSERT(1 == TestObject::DEPRECATED_CONSTANT, TheValueOfTestObject_DE PRECATED_CONSTANTDoesntMatchWithImplementation);
10475 COMPILE_ASSERT(1 == TestObject::MEASURED_CONSTANT, TheValueOfTestObject_MEAS URED_CONSTANTDoesntMatchWithImplementation);
10458 COMPILE_ASSERT(1 == TestObject::FEATURE_ENABLED_CONST, TheValueOfTestObject_ FEATURE_ENABLED_CONSTDoesntMatchWithImplementation); 10476 COMPILE_ASSERT(1 == TestObject::FEATURE_ENABLED_CONST, TheValueOfTestObject_ FEATURE_ENABLED_CONSTDoesntMatchWithImplementation);
10459 COMPILE_ASSERT(1 == TestObject::CONST_IMPL, TheValueOfTestObject_CONST_IMPLD oesntMatchWithImplementation); 10477 COMPILE_ASSERT(1 == TestObject::CONST_IMPL, TheValueOfTestObject_CONST_IMPLD oesntMatchWithImplementation);
10460 static const V8DOMConfiguration::MethodConfiguration staticVoidMethodMethodC onfiguration = { 10478 static const V8DOMConfiguration::MethodConfiguration staticVoidMethodMethodC onfiguration = {
10461 "staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback , 0, 0, V8DOMConfiguration::ExposedToAllScripts, 10479 "staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback , 0, 0, V8DOMConfiguration::ExposedToAllScripts,
10462 }; 10480 };
10463 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, staticVoidMethodMethodConfiguration, isolate); 10481 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, staticVoidMethodMethodConfiguration, isolate);
10464 static const V8DOMConfiguration::MethodConfiguration overloadedStaticMethodM ethodConfiguration = { 10482 static const V8DOMConfiguration::MethodConfiguration overloadedStaticMethodM ethodConfiguration = {
10465 "overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMe thodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 10483 "overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMe thodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
10466 }; 10484 };
10467 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, overloadedStaticMethodMethodConfiguration, isolate); 10485 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, overloadedStaticMethodMethodConfiguration, isolate);
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
11130 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); 11148 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF orPrivateScript", holder, v8String(scriptState->isolate(), cppValue));
11131 if (block.HasCaught()) { 11149 if (block.HasCaught()) {
11132 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat e(), block, scriptStateInUserScript, ExceptionState::SetterContext, "enumForPriv ateScript", "TestObject"); 11150 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat e(), block, scriptStateInUserScript, ExceptionState::SetterContext, "enumForPriv ateScript", "TestObject");
11133 block.ReThrow(); 11151 block.ReThrow();
11134 return false; 11152 return false;
11135 } 11153 }
11136 return true; 11154 return true;
11137 } 11155 }
11138 11156
11139 } // namespace blink 11157 } // namespace blink
OLDNEW
« Source/bindings/scripts/v8_interface.py ('K') | « Source/bindings/tests/idls/core/TestObject.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698