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

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

Issue 922233002: bindings: Makes runtime-enabled attributes on prototype chains compilable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 10 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 | Annotate | Revision Log
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 11395 matching lines...) Expand 10 before | Expand all | Expand 10 after
11406 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), 11406 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes),
11407 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors), 11407 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors),
11408 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods)); 11408 V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods));
11409 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 11409 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
11410 ALLOW_UNUSED_LOCAL(instanceTemplate); 11410 ALLOW_UNUSED_LOCAL(instanceTemplate);
11411 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 11411 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
11412 ALLOW_UNUSED_LOCAL(prototypeTemplate); 11412 ALLOW_UNUSED_LOCAL(prototypeTemplate);
11413 if (RuntimeEnabledFeatures::featureNameEnabled()) { 11413 if (RuntimeEnabledFeatures::featureNameEnabled()) {
11414 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 11414 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
11415 {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLong AttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttrib uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT) , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInstance}; 11415 {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLong AttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttrib uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT) , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInstance};
11416 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 11416 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp eTemplate, attributeConfiguration);
11417 } 11417 }
11418 #if ENABLE(CONDITION) 11418 #if ENABLE(CONDITION)
11419 if (RuntimeEnabledFeatures::featureNameEnabled()) { 11419 if (RuntimeEnabledFeatures::featureNameEnabled()) {
11420 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 11420 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
11421 {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditi onalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::co nditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 11421 {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditi onalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::co nditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
11422 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 11422 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp eTemplate, attributeConfiguration);
11423 } 11423 }
11424 #endif // ENABLE(CONDITION) 11424 #endif // ENABLE(CONDITION)
11425 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants [] = { 11425 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants [] = {
11426 {"CONST_VALUE_0", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 11426 {"CONST_VALUE_0", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort },
11427 {"CONST_VALUE_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 11427 {"CONST_VALUE_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort },
11428 {"CONST_VALUE_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 11428 {"CONST_VALUE_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort },
11429 {"CONST_VALUE_4", 4, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 11429 {"CONST_VALUE_4", 4, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort },
11430 {"CONST_VALUE_8", 8, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort }, 11430 {"CONST_VALUE_8", 8, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort },
11431 {"CONST_VALUE_9", -1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 11431 {"CONST_VALUE_9", -1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
11432 {"CONST_VALUE_10", 0, 0, "my constant string", V8DOMConfiguration::Const antTypeString}, 11432 {"CONST_VALUE_10", 0, 0, "my constant string", V8DOMConfiguration::Const antTypeString},
(...skipping 11 matching lines...) Expand all
11444 {"CONST_VALUE_21", 0, -1.3, 0, V8DOMConfiguration::ConstantTypeDouble}, 11444 {"CONST_VALUE_21", 0, -1.3, 0, V8DOMConfiguration::ConstantTypeDouble},
11445 {"CONST_VALUE_22", 0, -4e-9, 0, V8DOMConfiguration::ConstantTypeDouble}, 11445 {"CONST_VALUE_22", 0, -4e-9, 0, V8DOMConfiguration::ConstantTypeDouble},
11446 {"CONST_VALUE_23", 0, .123, 0, V8DOMConfiguration::ConstantTypeDouble}, 11446 {"CONST_VALUE_23", 0, .123, 0, V8DOMConfiguration::ConstantTypeDouble},
11447 {"CONST_VALUE_24", 0, 5E+4, 0, V8DOMConfiguration::ConstantTypeDouble}, 11447 {"CONST_VALUE_24", 0, 5E+4, 0, V8DOMConfiguration::ConstantTypeDouble},
11448 {"CONST_VALUE_25", 0, 1, 0, V8DOMConfiguration::ConstantTypeFloat}, 11448 {"CONST_VALUE_25", 0, 1, 0, V8DOMConfiguration::ConstantTypeFloat},
11449 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 11449 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
11450 }; 11450 };
11451 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants)); 11451 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants));
11452 if (RuntimeEnabledFeatures::featureNameEnabled()) { 11452 if (RuntimeEnabledFeatures::featureNameEnabled()) {
11453 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort} ; 11453 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort} ;
11454 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototyp eTemplate, &constantConfiguration, 1); 11454 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototype Template, constantConfiguration);
11455 } 11455 }
11456 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemp late, "DEPRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANTConstantGe tterCallback); 11456 V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, pro totypeTemplate, "DEPRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANT ConstantGetterCallback);
11457 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemp late, "MEASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTConstantGetter Callback); 11457 V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, pro totypeTemplate, "MEASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTCons tantGetterCallback);
11458 static_assert(0 == TestObject::CONST_VALUE_0, "the value of TestObject_CONST _VALUE_0 does not match with implementation"); 11458 static_assert(0 == TestObject::CONST_VALUE_0, "the value of TestObject_CONST _VALUE_0 does not match with implementation");
11459 static_assert(1 == TestObject::CONST_VALUE_1, "the value of TestObject_CONST _VALUE_1 does not match with implementation"); 11459 static_assert(1 == TestObject::CONST_VALUE_1, "the value of TestObject_CONST _VALUE_1 does not match with implementation");
11460 static_assert(2 == TestObject::CONST_VALUE_2, "the value of TestObject_CONST _VALUE_2 does not match with implementation"); 11460 static_assert(2 == TestObject::CONST_VALUE_2, "the value of TestObject_CONST _VALUE_2 does not match with implementation");
11461 static_assert(4 == TestObject::CONST_VALUE_4, "the value of TestObject_CONST _VALUE_4 does not match with implementation"); 11461 static_assert(4 == TestObject::CONST_VALUE_4, "the value of TestObject_CONST _VALUE_4 does not match with implementation");
11462 static_assert(8 == TestObject::CONST_VALUE_8, "the value of TestObject_CONST _VALUE_8 does not match with implementation"); 11462 static_assert(8 == TestObject::CONST_VALUE_8, "the value of TestObject_CONST _VALUE_8 does not match with implementation");
11463 static_assert(-1 == TestObject::CONST_VALUE_9, "the value of TestObject_CONS T_VALUE_9 does not match with implementation"); 11463 static_assert(-1 == TestObject::CONST_VALUE_9, "the value of TestObject_CONS T_VALUE_9 does not match with implementation");
11464 static_assert(0xffffffff == TestObject::CONST_VALUE_11, "the value of TestOb ject_CONST_VALUE_11 does not match with implementation"); 11464 static_assert(0xffffffff == TestObject::CONST_VALUE_11, "the value of TestOb ject_CONST_VALUE_11 does not match with implementation");
11465 static_assert(0x01 == TestObject::CONST_VALUE_12, "the value of TestObject_C ONST_VALUE_12 does not match with implementation"); 11465 static_assert(0x01 == TestObject::CONST_VALUE_12, "the value of TestObject_C ONST_VALUE_12 does not match with implementation");
11466 static_assert(0X20 == TestObject::CONST_VALUE_13, "the value of TestObject_C ONST_VALUE_13 does not match with implementation"); 11466 static_assert(0X20 == TestObject::CONST_VALUE_13, "the value of TestObject_C ONST_VALUE_13 does not match with implementation");
11467 static_assert(0x1abc == TestObject::CONST_VALUE_14, "the value of TestObject _CONST_VALUE_14 does not match with implementation"); 11467 static_assert(0x1abc == TestObject::CONST_VALUE_14, "the value of TestObject _CONST_VALUE_14 does not match with implementation");
11468 static_assert(010 == TestObject::CONST_VALUE_15, "the value of TestObject_CO NST_VALUE_15 does not match with implementation"); 11468 static_assert(010 == TestObject::CONST_VALUE_15, "the value of TestObject_CO NST_VALUE_15 does not match with implementation");
11469 static_assert(-010 == TestObject::CONST_VALUE_16, "the value of TestObject_C ONST_VALUE_16 does not match with implementation"); 11469 static_assert(-010 == TestObject::CONST_VALUE_16, "the value of TestObject_C ONST_VALUE_16 does not match with implementation");
11470 static_assert(-0x1A == TestObject::CONST_VALUE_16, "the value of TestObject_ CONST_VALUE_16 does not match with implementation"); 11470 static_assert(-0x1A == TestObject::CONST_VALUE_16, "the value of TestObject_ CONST_VALUE_16 does not match with implementation");
11471 static_assert(-0X1a == TestObject::CONST_VALUE_17, "the value of TestObject_ CONST_VALUE_17 does not match with implementation"); 11471 static_assert(-0X1a == TestObject::CONST_VALUE_17, "the value of TestObject_ CONST_VALUE_17 does not match with implementation");
11472 static_assert(1 == TestObject::DEPRECATED_CONSTANT, "the value of TestObject _DEPRECATED_CONSTANT does not match with implementation"); 11472 static_assert(1 == TestObject::DEPRECATED_CONSTANT, "the value of TestObject _DEPRECATED_CONSTANT does not match with implementation");
11473 static_assert(1 == TestObject::MEASURED_CONSTANT, "the value of TestObject_M EASURED_CONSTANT does not match with implementation"); 11473 static_assert(1 == TestObject::MEASURED_CONSTANT, "the value of TestObject_M EASURED_CONSTANT does not match with implementation");
11474 static_assert(1 == TestObject::FEATURE_ENABLED_CONST, "the value of TestObje ct_FEATURE_ENABLED_CONST does not match with implementation"); 11474 static_assert(1 == TestObject::FEATURE_ENABLED_CONST, "the value of TestObje ct_FEATURE_ENABLED_CONST does not match with implementation");
11475 static_assert(1 == TestObject::CONST_IMPL, "the value of TestObject_CONST_IM PL does not match with implementation"); 11475 static_assert(1 == TestObject::CONST_IMPL, "the value of TestObject_CONST_IM PL does not match with implementation");
11476 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestObjectV8Internal::iterator MethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 11476 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestObjectV8Internal::iterator MethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
11477 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate); 11477 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
11478 const V8DOMConfiguration::MethodConfiguration staticVoidMethodMethodConfigur ation = { 11478 const V8DOMConfiguration::MethodConfiguration staticVoidMethodMethodConfigur ation = {
11479 "staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback , 0, 0, V8DOMConfiguration::ExposedToAllScripts, 11479 "staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback , 0, 0, V8DOMConfiguration::ExposedToAllScripts,
11480 }; 11480 };
11481 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, staticVoidMethodMethodConfiguration, isolate); 11481 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, staticVoidMethodMethodConfiguration);
11482 const V8DOMConfiguration::MethodConfiguration overloadedStaticMethodMethodCo nfiguration = { 11482 const V8DOMConfiguration::MethodConfiguration overloadedStaticMethodMethodCo nfiguration = {
11483 "overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMe thodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 11483 "overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMe thodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
11484 }; 11484 };
11485 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, overloadedStaticMethodMethodConfiguration, isolate); 11485 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, overloadedStaticMethodMethodConfiguration);
11486 #if ENABLE(CONDITION) 11486 #if ENABLE(CONDITION)
11487 const V8DOMConfiguration::MethodConfiguration conditionalConditionStaticVoid MethodMethodConfiguration = { 11487 const V8DOMConfiguration::MethodConfiguration conditionalConditionStaticVoid MethodMethodConfiguration = {
11488 "conditionalConditionStaticVoidMethod", TestObjectV8Internal::conditiona lConditionStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts, 11488 "conditionalConditionStaticVoidMethod", TestObjectV8Internal::conditiona lConditionStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts,
11489 }; 11489 };
11490 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, conditionalConditionStaticVoidMethodMethodConfiguration, isolate); 11490 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, conditionalConditionStaticVoidMethodMethodConfiguration);
11491 #endif // ENABLE(CONDITION) 11491 #endif // ENABLE(CONDITION)
11492 const V8DOMConfiguration::MethodConfiguration doNotCheckSignatureVoidMethodM ethodConfiguration = { 11492 const V8DOMConfiguration::MethodConfiguration doNotCheckSignatureVoidMethodM ethodConfiguration = {
11493 "doNotCheckSignatureVoidMethod", TestObjectV8Internal::doNotCheckSignatu reVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 11493 "doNotCheckSignatureVoidMethod", TestObjectV8Internal::doNotCheckSignatu reVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
11494 }; 11494 };
11495 V8DOMConfiguration::installMethod(prototypeTemplate, v8::Local<v8::Signature >(), v8::None, doNotCheckSignatureVoidMethodMethodConfiguration, isolate); 11495 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, v8::Local<v8:: Signature>(), v8::None, doNotCheckSignatureVoidMethodMethodConfiguration);
11496 const V8DOMConfiguration::MethodConfiguration notEnumerableVoidMethodMethodC onfiguration = { 11496 const V8DOMConfiguration::MethodConfiguration notEnumerableVoidMethodMethodC onfiguration = {
11497 "notEnumerableVoidMethod", TestObjectV8Internal::notEnumerableVoidMethod MethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 11497 "notEnumerableVoidMethod", TestObjectV8Internal::notEnumerableVoidMethod MethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
11498 }; 11498 };
11499 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), notEnumerableVoidM ethodMethodConfiguration, isolate); 11499 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), notEnumer ableVoidMethodMethodConfiguration);
11500 if (RuntimeEnabledFeatures::featureNameEnabled()) { 11500 if (RuntimeEnabledFeatures::featureNameEnabled()) {
11501 const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMe thodConfiguration = { 11501 const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMe thodConfiguration = {
11502 "runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoid MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 11502 "runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoid MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
11503 }; 11503 };
11504 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, runtimeEnabledVoidMethodMethodConfiguration, isolate); 11504 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig nature, v8::None, runtimeEnabledVoidMethodMethodConfiguration);
11505 } 11505 }
11506 if (RuntimeEnabledFeatures::featureNameEnabled()) { 11506 if (RuntimeEnabledFeatures::featureNameEnabled()) {
11507 const V8DOMConfiguration::MethodConfiguration perWorldBindingsRuntimeEna bledVoidMethodMethodConfiguration = { 11507 const V8DOMConfiguration::MethodConfiguration perWorldBindingsRuntimeEna bledVoidMethodMethodConfiguration = {
11508 "perWorldBindingsRuntimeEnabledVoidMethod", TestObjectV8Internal::pe rWorldBindingsRuntimeEnabledVoidMethodMethodCallback, TestObjectV8Internal::perW orldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, 0, V8DOMConfigur ation::ExposedToAllScripts, 11508 "perWorldBindingsRuntimeEnabledVoidMethod", TestObjectV8Internal::pe rWorldBindingsRuntimeEnabledVoidMethodMethodCallback, TestObjectV8Internal::perW orldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, 0, V8DOMConfigur ation::ExposedToAllScripts,
11509 }; 11509 };
11510 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration, isolate); 11510 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig nature, v8::None, perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration);
11511 } 11511 }
11512 if (RuntimeEnabledFeatures::featureNameEnabled()) { 11512 if (RuntimeEnabledFeatures::featureNameEnabled()) {
11513 const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverloadedVo idMethodMethodConfiguration = { 11513 const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverloadedVo idMethodMethodConfiguration = {
11514 "runtimeEnabledOverloadedVoidMethod", TestObjectV8Internal::runtimeE nabledOverloadedVoidMethodMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAll Scripts, 11514 "runtimeEnabledOverloadedVoidMethod", TestObjectV8Internal::runtimeE nabledOverloadedVoidMethodMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAll Scripts,
11515 }; 11515 };
11516 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, runtimeEnabledOverloadedVoidMethodMethodConfiguration, isolate); 11516 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig nature, v8::None, runtimeEnabledOverloadedVoidMethodMethodConfiguration);
11517 } 11517 }
11518 const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloa dedVoidMethodMethodConfiguration = { 11518 const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloa dedVoidMethodMethodConfiguration = {
11519 "partiallyRuntimeEnabledOverloadedVoidMethod", TestObjectV8Internal::par tiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, 0, TestObjectV8Internal: :partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), V8DOMConfiguration:: ExposedToAllScripts, 11519 "partiallyRuntimeEnabledOverloadedVoidMethod", TestObjectV8Internal::par tiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, 0, TestObjectV8Internal: :partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), V8DOMConfiguration:: ExposedToAllScripts,
11520 }; 11520 };
11521 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::N one, partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration, isolate); 11521 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::None, partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration);
11522 const V8DOMConfiguration::MethodConfiguration unforgeableVoidMethodMethodCon figuration = { 11522 const V8DOMConfiguration::MethodConfiguration unforgeableVoidMethodMethodCon figuration = {
11523 "unforgeableVoidMethod", TestObjectV8Internal::unforgeableVoidMethodMeth odCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 11523 "unforgeableVoidMethod", TestObjectV8Internal::unforgeableVoidMethodMeth odCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
11524 }; 11524 };
11525 V8DOMConfiguration::installMethod(instanceTemplate, defaultSignature, static _cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), unforgeableVoidMeth odMethodConfiguration, isolate); 11525 V8DOMConfiguration::installMethod(isolate, instanceTemplate, defaultSignatur e, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), unforgeabl eVoidMethodMethodConfiguration);
11526 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback , TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::Extern al::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8: :AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 11526 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback , TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::Extern al::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8: :AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
11527 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, Te stObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::Ne w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 11527 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, Te stObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::Ne w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Local<v8::Acces sorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
11528 11528
11529 // Custom toString template 11529 // Custom toString template
11530 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 11530 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
11531 } 11531 }
11532 11532
11533 v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) 11533 v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate)
11534 { 11534 {
11535 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestObjectTemplate); 11535 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestObjectTemplate);
(...skipping 15 matching lines...) Expand all
11551 } 11551 }
11552 11552
11553 void V8TestObject::installConditionallyEnabledProperties(v8::Local<v8::Object> i nstanceObject, v8::Isolate* isolate) 11553 void V8TestObject::installConditionallyEnabledProperties(v8::Local<v8::Object> i nstanceObject, v8::Isolate* isolate)
11554 { 11554 {
11555 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 11555 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
11556 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 11556 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
11557 11557
11558 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 11558 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
11559 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 11559 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
11560 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8: :DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::OnInstance}; 11560 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8: :DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::OnInstance};
11561 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 11561 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
11562 } 11562 }
11563 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 11563 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
11564 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 11564 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
11565 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal::p erContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8 Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0 , 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt ribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:: OnInstance}; 11565 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal::p erContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8 Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0 , 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt ribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:: OnInstance};
11566 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 11566 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
11567 } 11567 }
11568 } 11568 }
11569 11569
11570 void V8TestObject::installConditionallyEnabledMethods(v8::Local<v8::Object> prot otypeObject, v8::Isolate* isolate) 11570 void V8TestObject::installConditionallyEnabledMethods(v8::Local<v8::Object> prot otypeObject, v8::Isolate* isolate)
11571 { 11571 {
11572 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 11572 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
11573 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 11573 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
11574 ASSERT(context); 11574 ASSERT(context);
11575 11575
11576 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 11576 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
12053 return false; 12053 return false;
12054 12054
12055 ScriptState::Scope scope(scriptState); 12055 ScriptState::Scope scope(scriptState);
12056 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12056 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
12057 12057
12058 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 12058 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
12059 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 12059 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
12060 } 12060 }
12061 12061
12062 } // namespace blink 12062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698