| OLD | NEW | 
|---|
| 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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1071     {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCa
      llback, 0, 0}, | 1071     {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCa
      llback, 0, 0}, | 
| 1072 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 1072 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1073 #if ENABLE(Condition11) || ENABLE(Condition12) | 1073 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1074     {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCa
      llback, 0, 0}, | 1074     {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCa
      llback, 0, 0}, | 
| 1075 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 1075 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1076 }; | 1076 }; | 
| 1077 | 1077 | 
| 1078 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[
      ] = { | 1078 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[
      ] = { | 
| 1079 #if ENABLE(Condition22) || ENABLE(Condition23) | 1079 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1080     {"IMPLEMENTSCONSTANT1", 1}, | 1080     {"IMPLEMENTSCONSTANT1", 1}, | 
| 1081 #endif | 1081 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1082 #if ENABLE(Condition22) || ENABLE(Condition23) | 1082 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1083     {"IMPLEMENTSCONSTANT2", 2}, | 1083     {"IMPLEMENTSCONSTANT2", 2}, | 
| 1084 #endif | 1084 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1085 #if ENABLE(Condition11) || ENABLE(Condition12) | 1085 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1086     {"SUPPLEMENTALCONSTANT1", 1}, | 1086     {"SUPPLEMENTALCONSTANT1", 1}, | 
| 1087 #endif | 1087 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1088 #if ENABLE(Condition11) || ENABLE(Condition12) | 1088 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1089     {"SUPPLEMENTALCONSTANT2", 2}, | 1089     {"SUPPLEMENTALCONSTANT2", 2}, | 
| 1090 #endif | 1090 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1091 }; | 1091 }; | 
| 1092 | 1092 | 
| 1093 #if ENABLE(Condition22) || ENABLE(Condition23) | 1093 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1094 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TestInterfaceEnumIMPLEM
      ENTSCONSTANT1IsWrongUseDoNotCheckConstants); | 1094 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TestInterfaceEnumIMPLEM
      ENTSCONSTANT1IsWrongUseDoNotCheckConstants); | 
| 1095 #endif | 1095 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1096 #if ENABLE(Condition22) || ENABLE(Condition23) | 1096 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1097 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWro
      ngUseDoNotCheckConstants); | 1097 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TestInterfaceEnumCONST_IMPLIsWro
      ngUseDoNotCheckConstants); | 
| 1098 #endif | 1098 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1099 #if ENABLE(Condition11) || ENABLE(Condition12) | 1099 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1100 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TestInterfaceEn
      umSUPPLEMENTALCONSTANT1IsWrongUseDoNotCheckConstants); | 1100 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TestInterfaceEn
      umSUPPLEMENTALCONSTANT1IsWrongUseDoNotCheckConstants); | 
| 1101 #endif | 1101 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1102 #if ENABLE(Condition11) || ENABLE(Condition12) | 1102 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1103 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TestInterfaceEnumCONST_IMP
      LIsWrongUseDoNotCheckConstants); | 1103 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TestInterfaceEnumCONST_IMP
      LIsWrongUseDoNotCheckConstants); | 
| 1104 #endif | 1104 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1105 | 1105 | 
| 1106 void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Val
      ue>& args) | 1106 void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Val
      ue>& args) | 
| 1107 { | 1107 { | 
| 1108     TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 1108     TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 
| 1109     if (!args.IsConstructCall()) { | 1109     if (!args.IsConstructCall()) { | 
| 1110         throwTypeError("DOM object constructor cannot be called as a function.",
       args.GetIsolate()); | 1110         throwTypeError("DOM object constructor cannot be called as a function.",
       args.GetIsolate()); | 
| 1111         return; | 1111         return; | 
| 1112     } | 1112     } | 
| 1113 | 1113 | 
| 1114     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 1114     if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 
| 1115         args.GetReturnValue().Set(args.Holder()); | 1115         args.GetReturnValue().Set(args.Holder()); | 
| 1116         return; | 1116         return; | 
| 1117     } | 1117     } | 
| 1118 | 1118 | 
| 1119     TestInterfaceV8Internal::constructor(args); | 1119     TestInterfaceV8Internal::constructor(args); | 
| 1120 } | 1120 } | 
| 1121 | 1121 | 
| 1122 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Han
      dle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWo
      rldType) | 1122 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Han
      dle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWo
      rldType) | 
| 1123 { | 1123 { | 
| 1124     desc->ReadOnlyPrototype(); | 1124     desc->ReadOnlyPrototype(); | 
| 1125 | 1125 | 
| 1126     v8::Local<v8::Signature> defaultSignature; | 1126     v8::Local<v8::Signature> defaultSignature; | 
| 1127     defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestIn
      terface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount
      , | 1127     defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestIn
      terface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount
      , | 
| 1128         V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes), | 1128         V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes), | 
| 1129         V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolat
      e, currentWorldType); | 1129         V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolat
      e, currentWorldType); | 
| 1130     UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 1130     UNUSED_PARAM(defaultSignature); | 
| 1131     desc->SetCallHandler(V8TestInterface::constructorCallback); | 1131     desc->SetCallHandler(V8TestInterface::constructorCallback); | 
| 1132     desc->SetLength(1); | 1132     desc->SetLength(1); | 
| 1133     v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 1133     v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 
| 1134     v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 1134     v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 
| 1135     UNUSED_PARAM(instance); // In some cases, it will not be used. | 1135     UNUSED_PARAM(instance); | 
| 1136     UNUSED_PARAM(proto); // In some cases, it will not be used. | 1136     UNUSED_PARAM(proto); | 
| 1137 | 1137 | 
| 1138 #if ENABLE(Condition22) || ENABLE(Condition23) | 1138 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1139     if (RuntimeEnabledFeatures::condition23Enabled()) { | 1139     if (RuntimeEnabledFeatures::condition23Enabled()) { | 
| 1140         static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
      ration =\ | 1140         static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
      ration =\ | 
| 1141         {"Node23", TestInterfaceV8Internal::Node23AttributeGetterCallback, TestI
      nterfaceV8Internal::Node23AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
      ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
      nstance */}; | 1141         {"Node23", TestInterfaceV8Internal::Node23AttributeGetterCallback, TestI
      nterfaceV8Internal::Node23AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
      ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
      nstance */}; | 
| 1142         V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
      tion, isolate, currentWorldType); | 1142         V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
      tion, isolate, currentWorldType); | 
| 1143     } | 1143     } | 
| 1144 | 1144 | 
| 1145 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 1145 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1146 | 1146 | 
| 1147 #if ENABLE(Condition11) || ENABLE(Condition12) | 1147 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1148     if (RuntimeEnabledFeatures::condition13Enabled()) { | 1148     if (RuntimeEnabledFeatures::condition13Enabled()) { | 
| 1149         static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
      ration =\ | 1149         static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
      ration =\ | 
| 1150         {"Node13", TestInterfaceV8Internal::Node13AttributeGetterCallback, TestI
      nterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
      ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
      nstance */}; | 1150         {"Node13", TestInterfaceV8Internal::Node13AttributeGetterCallback, TestI
      nterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
      ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
      nstance */}; | 
| 1151         V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
      tion, isolate, currentWorldType); | 1151         V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
      tion, isolate, currentWorldType); | 
| 1152     } | 1152     } | 
| 1153 | 1153 | 
| 1154 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 1154 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
|  | 1155     V8DOMConfiguration::installConstants(desc, proto, V8TestInterfaceConstants, 
      WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); | 
| 1155     desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::n
      amedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback
      , TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Interna
      l::namedPropertyEnumeratorCallback); | 1156     desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::n
      amedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback
      , TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Interna
      l::namedPropertyEnumeratorCallback); | 
| 1156 #if ENABLE(Condition22) || ENABLE(Condition23) | 1157 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1157 | 1158 | 
| 1158     // Custom Signature 'implementsMethod2' | 1159     // Custom Signature 'implementsMethod2' | 
| 1159     const int implementsMethod2Argc = 2; | 1160     const int implementsMethod2Argc = 2; | 
| 1160     v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc
      ] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTe
      mplate(&V8TestObject::info, currentWorldType) }; | 1161     v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc
      ] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTe
      mplate(&V8TestObject::info, currentWorldType) }; | 
| 1161     v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(de
      sc, implementsMethod2Argc, implementsMethod2Argv); | 1162     v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(de
      sc, implementsMethod2Argc, implementsMethod2Argv); | 
| 1162     proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate:
      :New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), im
      plementsMethod2Signature, 2)); | 1163     proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate:
      :New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), im
      plementsMethod2Signature, 2)); | 
| 1163 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 1164 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1164 #if ENABLE(Condition22) || ENABLE(Condition23) | 1165 #if ENABLE(Condition22) || ENABLE(Condition23) | 
| 1165     desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::
      New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8:
      :Local<v8::Signature>(), 0)); | 1166     desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::
      New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8:
      :Local<v8::Signature>(), 0)); | 
| 1166 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 1167 #endif // ENABLE(Condition22) || ENABLE(Condition23) | 
| 1167 #if ENABLE(Condition11) || ENABLE(Condition12) | 1168 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1168 | 1169 | 
| 1169     // Custom Signature 'supplementalMethod2' | 1170     // Custom Signature 'supplementalMethod2' | 
| 1170     const int supplementalMethod2Argc = 2; | 1171     const int supplementalMethod2Argc = 2; | 
| 1171     v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2
      Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r
      awTemplate(&V8TestObject::info, currentWorldType) }; | 1172     v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2
      Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r
      awTemplate(&V8TestObject::info, currentWorldType) }; | 
| 1172     v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(
      desc, supplementalMethod2Argc, supplementalMethod2Argv); | 1173     v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(
      desc, supplementalMethod2Argc, supplementalMethod2Argv); | 
| 1173     proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplat
      e::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined()
      , supplementalMethod2Signature, 2)); | 1174     proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplat
      e::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined()
      , supplementalMethod2Signature, 2)); | 
| 1174 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 1175 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1175 #if ENABLE(Condition11) || ENABLE(Condition12) | 1176 #if ENABLE(Condition11) || ENABLE(Condition12) | 
| 1176     desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate
      ::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(),
       v8::Local<v8::Signature>(), 0)); | 1177     desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate
      ::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(),
       v8::Local<v8::Signature>(), 0)); | 
| 1177 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 1178 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 
| 1178     V8DOMConfiguration::installConstants(desc, proto, V8TestInterfaceConstants, 
      WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); |  | 
| 1179 | 1179 | 
| 1180     // Custom toString template | 1180     // Custom toString template | 
| 1181     desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
      StringTemplate()); | 1181     desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
      StringTemplate()); | 
| 1182     return desc; | 1182     return desc; | 
| 1183 } | 1183 } | 
| 1184 | 1184 | 
| 1185 v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isola
      te, WrapperWorldType currentWorldType) | 1185 v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isola
      te, WrapperWorldType currentWorldType) | 
| 1186 { | 1186 { | 
| 1187     V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 1187     V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 
| 1188     V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
      rldType).find(&info); | 1188     V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
      rldType).find(&info); | 
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1272 } | 1272 } | 
| 1273 | 1273 | 
| 1274 void V8TestInterface::derefObject(void* object) | 1274 void V8TestInterface::derefObject(void* object) | 
| 1275 { | 1275 { | 
| 1276     fromInternalPointer(object)->deref(); | 1276     fromInternalPointer(object)->deref(); | 
| 1277 } | 1277 } | 
| 1278 | 1278 | 
| 1279 } // namespace WebCore | 1279 } // namespace WebCore | 
| 1280 | 1280 | 
| 1281 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1281 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 
| OLD | NEW | 
|---|