| 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 5211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5222 v8::Handle<v8::FunctionTemplate> svgPointMethodArgv[svgPointMethodArgc] = {
V8PerIsolateData::from(isolate)->rawTemplate(&V8SVGPoint::wrapperTypeInfo, curre
ntWorldType), v8::Handle<v8::FunctionTemplate>() }; | 5222 v8::Handle<v8::FunctionTemplate> svgPointMethodArgv[svgPointMethodArgc] = {
V8PerIsolateData::from(isolate)->rawTemplate(&V8SVGPoint::wrapperTypeInfo, curre
ntWorldType), v8::Handle<v8::FunctionTemplate>() }; |
| 5223 v8::Handle<v8::Signature> svgPointMethodSignature = v8::Signature::New(funct
ionTemplate, svgPointMethodArgc, svgPointMethodArgv); | 5223 v8::Handle<v8::Signature> svgPointMethodSignature = v8::Signature::New(funct
ionTemplate, svgPointMethodArgc, svgPointMethodArgv); |
| 5224 prototypeTemplate->Set(v8::String::NewSymbol("svgPointMethod"), v8::Function
Template::New(TestObjV8Internal::svgPointMethodMethodCallback, v8Undefined(), sv
gPointMethodSignature, 2)); | 5224 prototypeTemplate->Set(v8::String::NewSymbol("svgPointMethod"), v8::Function
Template::New(TestObjV8Internal::svgPointMethodMethodCallback, v8Undefined(), sv
gPointMethodSignature, 2)); |
| 5225 | 5225 |
| 5226 // Custom Signature 'variadicNodeMethod' | 5226 // Custom Signature 'variadicNodeMethod' |
| 5227 const int variadicNodeMethodArgc = 2; | 5227 const int variadicNodeMethodArgc = 2; |
| 5228 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodAr
gc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperTypeInfo, c
urrentWorldType), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperT
ypeInfo, currentWorldType) }; | 5228 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodAr
gc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperTypeInfo, c
urrentWorldType), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperT
ypeInfo, currentWorldType) }; |
| 5229 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(f
unctionTemplate, variadicNodeMethodArgc, variadicNodeMethodArgv); | 5229 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(f
unctionTemplate, variadicNodeMethodArgc, variadicNodeMethodArgv); |
| 5230 prototypeTemplate->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::Func
tionTemplate::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefin
ed(), variadicNodeMethodSignature, 2)); | 5230 prototypeTemplate->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::Func
tionTemplate::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefin
ed(), variadicNodeMethodSignature, 2)); |
| 5231 functionTemplate->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::F
unctionTemplate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8
Undefined(), v8::Local<v8::Signature>(), 0)); | 5231 functionTemplate->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::F
unctionTemplate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8
Undefined(), v8::Local<v8::Signature>(), 0)); |
| 5232 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticReadOnl
yLongAttr"), TestObjV8Internal::staticReadOnlyLongAttrAttributeGetterCallback, 0
, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle
<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 5232 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticReadOnl
yLongAttr"), TestObjV8Internal::staticReadOnlyLongAttrAttributeGetterCallback, 0
, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v
8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT))
; |
| 5233 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticStringA
ttr"), TestObjV8Internal::staticStringAttrAttributeGetterCallback, TestObjV8Inte
rnal::staticStringAttrAttributeSetterCallback, v8::External::New(0), static_cast
<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_c
ast<v8::AccessControl>(v8::DEFAULT)); | 5233 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticStringA
ttr"), TestObjV8Internal::staticStringAttrAttributeGetterCallback, TestObjV8Inte
rnal::staticStringAttrAttributeSetterCallback, v8::External::New(isolate, 0), st
atic_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(),
static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 5234 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("TestSubObj"),
TestObjV8Internal::TestObjConstructorGetter, 0, v8::External::New(const_cast<Wr
apperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_cast<v8::PropertyAttrib
ute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessC
ontrol>(v8::DEFAULT)); | 5234 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("TestSubObj"),
TestObjV8Internal::TestObjConstructorGetter, 0, v8::External::New(isolate, cons
t_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_cast<v8::Prope
rtyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), static_cast<v8
::AccessControl>(v8::DEFAULT)); |
| 5235 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("deprecatedSta
ticReadOnlyAttr"), TestObjV8Internal::deprecatedStaticReadOnlyAttrAttributeGette
rCallback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None)
, v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAUL
T)); | 5235 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("deprecatedSta
ticReadOnlyAttr"), TestObjV8Internal::deprecatedStaticReadOnlyAttrAttributeGette
rCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(
v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v
8::DEFAULT)); |
| 5236 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("deprecatedSta
ticAttr"), TestObjV8Internal::deprecatedStaticAttrAttributeGetterCallback, TestO
bjV8Internal::deprecatedStaticAttrAttributeSetterCallback, v8::External::New(0),
static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>
(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 5236 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("deprecatedSta
ticAttr"), TestObjV8Internal::deprecatedStaticAttrAttributeGetterCallback, TestO
bjV8Internal::deprecatedStaticAttrAttributeSetterCallback, v8::External::New(iso
late, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorS
ignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 5237 | 5237 |
| 5238 // Custom toString template | 5238 // Custom toString template |
| 5239 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); | 5239 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); |
| 5240 return functionTemplate; | 5240 return functionTemplate; |
| 5241 } | 5241 } |
| 5242 | 5242 |
| 5243 v8::Handle<v8::FunctionTemplate> V8TestObject::GetTemplate(v8::Isolate* isolate,
WrapperWorldType currentWorldType) | 5243 v8::Handle<v8::FunctionTemplate> V8TestObject::GetTemplate(v8::Isolate* isolate,
WrapperWorldType currentWorldType) |
| 5244 { | 5244 { |
| 5245 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 5245 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 5246 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); | 5246 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5312 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf
o, wrapper, isolate, WrapperConfiguration::Independent); | 5312 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf
o, wrapper, isolate, WrapperConfiguration::Independent); |
| 5313 return wrapper; | 5313 return wrapper; |
| 5314 } | 5314 } |
| 5315 | 5315 |
| 5316 void V8TestObject::derefObject(void* object) | 5316 void V8TestObject::derefObject(void* object) |
| 5317 { | 5317 { |
| 5318 fromInternalPointer(object)->deref(); | 5318 fromInternalPointer(object)->deref(); |
| 5319 } | 5319 } |
| 5320 | 5320 |
| 5321 } // namespace WebCore | 5321 } // namespace WebCore |
| OLD | NEW |