| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 | 890 |
| 891 // Custom Signature 'supplementalMethod2' | 891 // Custom Signature 'supplementalMethod2' |
| 892 const int supplementalMethod2Argc = 2; | 892 const int supplementalMethod2Argc = 2; |
| 893 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2
Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r
awTemplate(&V8TestObject::wrapperTypeInfo, currentWorldType) }; | 893 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2
Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r
awTemplate(&V8TestObject::wrapperTypeInfo, currentWorldType) }; |
| 894 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(
functionTemplate, supplementalMethod2Argc, supplementalMethod2Argv); | 894 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(
functionTemplate, supplementalMethod2Argc, supplementalMethod2Argv); |
| 895 prototypeTemplate->Set(v8::String::NewSymbol("supplementalMethod2"), v8::Fun
ctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v
8Undefined(), supplementalMethod2Signature, 2)); | 895 prototypeTemplate->Set(v8::String::NewSymbol("supplementalMethod2"), v8::Fun
ctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v
8Undefined(), supplementalMethod2Signature, 2)); |
| 896 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 896 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 897 #if ENABLE(Condition11) || ENABLE(Condition12) | 897 #if ENABLE(Condition11) || ENABLE(Condition12) |
| 898 functionTemplate->Set(v8::String::NewSymbol("supplementalMethod4"), v8::Func
tionTemplate::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8
Undefined(), v8::Local<v8::Signature>(), 0)); | 898 functionTemplate->Set(v8::String::NewSymbol("supplementalMethod4"), v8::Func
tionTemplate::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8
Undefined(), v8::Local<v8::Signature>(), 0)); |
| 899 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 899 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 900 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("implementsSta
ticReadOnlyAttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttribut
eGetterCallback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8:
:None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::
DEFAULT)); | 900 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("implementsSta
ticReadOnlyAttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttribut
eGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttri
bute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessCont
rol>(v8::DEFAULT)); |
| 901 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("implementsSta
ticAttr"), TestInterfaceV8Internal::implementsStaticAttrAttributeGetterCallback,
TestInterfaceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::Exter
nal::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Access
orSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 901 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("implementsSta
ticAttr"), TestInterfaceV8Internal::implementsStaticAttrAttributeGetterCallback,
TestInterfaceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::Exter
nal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v
8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 902 #if ENABLE(Condition11) || ENABLE(Condition12) | 902 #if ENABLE(Condition11) || ENABLE(Condition12) |
| 903 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("supplementalS
taticReadOnlyAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttr
ibuteGetterCallback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>
(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(
v8::DEFAULT)); | 903 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("supplementalS
taticReadOnlyAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttr
ibuteGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyA
ttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::Access
Control>(v8::DEFAULT)); |
| 904 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 904 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 905 #if ENABLE(Condition11) || ENABLE(Condition12) | 905 #if ENABLE(Condition11) || ENABLE(Condition12) |
| 906 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("supplementalS
taticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCallb
ack, TestInterfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v8:
:External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::
AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 906 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("supplementalS
taticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCallb
ack, TestInterfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v8:
:External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Ha
ndle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 907 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 907 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 908 | 908 |
| 909 // Custom toString template | 909 // Custom toString template |
| 910 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); | 910 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); |
| 911 return functionTemplate; | 911 return functionTemplate; |
| 912 } | 912 } |
| 913 | 913 |
| 914 v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isola
te, WrapperWorldType currentWorldType) | 914 v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isola
te, WrapperWorldType currentWorldType) |
| 915 { | 915 { |
| 916 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 916 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 } | 984 } |
| 985 | 985 |
| 986 void V8TestInterface::derefObject(void* object) | 986 void V8TestInterface::derefObject(void* object) |
| 987 { | 987 { |
| 988 fromInternalPointer(object)->deref(); | 988 fromInternalPointer(object)->deref(); |
| 989 } | 989 } |
| 990 | 990 |
| 991 } // namespace WebCore | 991 } // namespace WebCore |
| 992 | 992 |
| 993 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 993 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| OLD | NEW |