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

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

Issue 1310443005: [bindings] Compact ConstantConfiguration by using |union| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 12907 matching lines...) Expand 10 before | Expand all | Expand 10 after
12918 {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditi onalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::co nditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAUL T, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAl lScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 12918 {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditi onalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::co nditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAUL T, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAl lScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
12919 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, functionTemplate, defaultSignature, accessorConfiguration); 12919 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, functionTemplate, defaultSignature, accessorConfiguration);
12920 } 12920 }
12921 #endif // ENABLE(CONDITION) 12921 #endif // ENABLE(CONDITION)
12922 if (RuntimeEnabledFeatures::featureNameEnabled()) { 12922 if (RuntimeEnabledFeatures::featureNameEnabled()) {
12923 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = \ 12923 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = \
12924 {"unscopeableRuntimeEnabledLongAttribute", TestObjectV8Internal::unscope ableRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::un scopeableRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAUL T, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAl lScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 12924 {"unscopeableRuntimeEnabledLongAttribute", TestObjectV8Internal::unscope ableRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::un scopeableRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAUL T, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAl lScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
12925 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, functionTemplate, defaultSignature, accessorConfiguration); 12925 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype Template, functionTemplate, defaultSignature, accessorConfiguration);
12926 } 12926 }
12927 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants [] = { 12927 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants [] = {
12928 {"CONST_VALUE_0", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 12928 {"CONST_VALUE_0", 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
12929 {"CONST_VALUE_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 12929 {"CONST_VALUE_1", 1, V8DOMConfiguration::ConstantTypeUnsignedShort},
12930 {"CONST_VALUE_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 12930 {"CONST_VALUE_2", 2, V8DOMConfiguration::ConstantTypeUnsignedShort},
12931 {"CONST_VALUE_4", 4, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 12931 {"CONST_VALUE_4", 4, V8DOMConfiguration::ConstantTypeUnsignedShort},
12932 {"CONST_VALUE_8", 8, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 12932 {"CONST_VALUE_8", 8, V8DOMConfiguration::ConstantTypeUnsignedShort},
12933 {"CONST_VALUE_9", -1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 12933 {"CONST_VALUE_9", -1, V8DOMConfiguration::ConstantTypeShort},
12934 {"CONST_VALUE_10", 0, 0, "my constant string", V8DOMConfiguration::Const antTypeString}, 12934 {"CONST_VALUE_10", "my constant string", V8DOMConfiguration::ConstantTyp eString},
12935 {"CONST_VALUE_11", 0xffffffff, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 12935 {"CONST_VALUE_11", 0xffffffff, V8DOMConfiguration::ConstantTypeUnsignedS hort},
12936 {"CONST_VALUE_12", 0x01, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedS hort}, 12936 {"CONST_VALUE_12", 0x01, V8DOMConfiguration::ConstantTypeUnsignedShort},
12937 {"CONST_VALUE_13", 0X20, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedS hort}, 12937 {"CONST_VALUE_13", 0X20, V8DOMConfiguration::ConstantTypeUnsignedShort},
12938 {"CONST_VALUE_14", 0x1abc, 0, 0, V8DOMConfiguration::ConstantTypeUnsigne dShort}, 12938 {"CONST_VALUE_14", 0x1abc, V8DOMConfiguration::ConstantTypeUnsignedShort },
12939 {"CONST_VALUE_15", 010, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedSh ort}, 12939 {"CONST_VALUE_15", 010, V8DOMConfiguration::ConstantTypeUnsignedShort},
12940 {"CONST_VALUE_16", -010, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedS hort}, 12940 {"CONST_VALUE_16", -010, V8DOMConfiguration::ConstantTypeUnsignedShort},
12941 {"CONST_VALUE_16", -0x1A, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned Short}, 12941 {"CONST_VALUE_16", -0x1A, V8DOMConfiguration::ConstantTypeUnsignedShort} ,
12942 {"CONST_VALUE_17", -0X1a, 0, 0, V8DOMConfiguration::ConstantTypeUnsigned Short}, 12942 {"CONST_VALUE_17", -0X1a, V8DOMConfiguration::ConstantTypeUnsignedShort} ,
12943 {"CONST_VALUE_18", 0, 0.123, 0, V8DOMConfiguration::ConstantTypeDouble}, 12943 {"CONST_VALUE_18", 0.123f, V8DOMConfiguration::ConstantTypeDouble},
12944 {"CONST_VALUE_19", 0, 4e9, 0, V8DOMConfiguration::ConstantTypeDouble}, 12944 {"CONST_VALUE_19", 4e9f, V8DOMConfiguration::ConstantTypeDouble},
12945 {"CONST_VALUE_20", 0, 3.4e5, 0, V8DOMConfiguration::ConstantTypeDouble}, 12945 {"CONST_VALUE_20", 3.4e5f, V8DOMConfiguration::ConstantTypeDouble},
12946 {"CONST_VALUE_21", 0, -1.3, 0, V8DOMConfiguration::ConstantTypeDouble}, 12946 {"CONST_VALUE_21", -1.3f, V8DOMConfiguration::ConstantTypeDouble},
12947 {"CONST_VALUE_22", 0, -4e-9, 0, V8DOMConfiguration::ConstantTypeDouble}, 12947 {"CONST_VALUE_22", -4e-9f, V8DOMConfiguration::ConstantTypeDouble},
12948 {"CONST_VALUE_23", 0, .123, 0, V8DOMConfiguration::ConstantTypeDouble}, 12948 {"CONST_VALUE_23", .123f, V8DOMConfiguration::ConstantTypeDouble},
12949 {"CONST_VALUE_24", 0, 5E+4, 0, V8DOMConfiguration::ConstantTypeDouble}, 12949 {"CONST_VALUE_24", 5E+4f, V8DOMConfiguration::ConstantTypeDouble},
12950 {"CONST_VALUE_25", 0, 1, 0, V8DOMConfiguration::ConstantTypeFloat}, 12950 {"CONST_VALUE_25", 1f, V8DOMConfiguration::ConstantTypeFloat},
12951 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 12951 {"CONST_JAVASCRIPT", 1, V8DOMConfiguration::ConstantTypeShort},
12952 }; 12952 };
12953 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants)); 12953 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants));
12954 if (RuntimeEnabledFeatures::featureNameEnabled()) { 12954 if (RuntimeEnabledFeatures::featureNameEnabled()) {
12955 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort} ; 12955 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", 1, V8DOMConfiguration::ConstantTypeShort};
12956 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototype Template, constantConfiguration); 12956 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototype Template, constantConfiguration);
12957 } 12957 }
12958 V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, pro totypeTemplate, "DEPRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANT ConstantGetterCallback); 12958 V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, pro totypeTemplate, "DEPRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANT ConstantGetterCallback);
12959 V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, pro totypeTemplate, "MEASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTCons tantGetterCallback); 12959 V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, pro totypeTemplate, "MEASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTCons tantGetterCallback);
12960 static_assert(0 == TestObject::CONST_VALUE_0, "the value of TestObject_CONST _VALUE_0 does not match with implementation"); 12960 static_assert(0 == TestObject::CONST_VALUE_0, "the value of TestObject_CONST _VALUE_0 does not match with implementation");
12961 static_assert(1 == TestObject::CONST_VALUE_1, "the value of TestObject_CONST _VALUE_1 does not match with implementation"); 12961 static_assert(1 == TestObject::CONST_VALUE_1, "the value of TestObject_CONST _VALUE_1 does not match with implementation");
12962 static_assert(2 == TestObject::CONST_VALUE_2, "the value of TestObject_CONST _VALUE_2 does not match with implementation"); 12962 static_assert(2 == TestObject::CONST_VALUE_2, "the value of TestObject_CONST _VALUE_2 does not match with implementation");
12963 static_assert(4 == TestObject::CONST_VALUE_4, "the value of TestObject_CONST _VALUE_4 does not match with implementation"); 12963 static_assert(4 == TestObject::CONST_VALUE_4, "the value of TestObject_CONST _VALUE_4 does not match with implementation");
12964 static_assert(8 == TestObject::CONST_VALUE_8, "the value of TestObject_CONST _VALUE_8 does not match with implementation"); 12964 static_assert(8 == TestObject::CONST_VALUE_8, "the value of TestObject_CONST _VALUE_8 does not match with implementation");
12965 static_assert(-1 == TestObject::CONST_VALUE_9, "the value of TestObject_CONS T_VALUE_9 does not match with implementation"); 12965 static_assert(-1 == TestObject::CONST_VALUE_9, "the value of TestObject_CONS T_VALUE_9 does not match with implementation");
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
13597 ScriptState::Scope scope(scriptState); 13597 ScriptState::Scope scope(scriptState);
13598 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 13598 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
13599 if (holder.IsEmpty()) 13599 if (holder.IsEmpty())
13600 return false; 13600 return false;
13601 13601
13602 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 13602 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
13603 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 13603 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
13604 } 13604 }
13605 13605
13606 } // namespace blink 13606 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/modules/V8TestInterface5.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698