| 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 6493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6504 if (RuntimeEnabledFeatures::featureNameEnabled()) | 6504 if (RuntimeEnabledFeatures::featureNameEnabled()) |
| 6505 prototypeTemplate->Set(v8::String::NewSymbol("runtimeEnabledVoidMethod")
, v8::FunctionTemplate::New(TestObjectPythonV8Internal::runtimeEnabledVoidMethod
MethodCallback, v8Undefined(), defaultSignature, 0)); | 6505 prototypeTemplate->Set(v8::String::NewSymbol("runtimeEnabledVoidMethod")
, v8::FunctionTemplate::New(TestObjectPythonV8Internal::runtimeEnabledVoidMethod
MethodCallback, v8Undefined(), defaultSignature, 0)); |
| 6506 if (currentWorldType == MainWorld) { | 6506 if (currentWorldType == MainWorld) { |
| 6507 if (RuntimeEnabledFeatures::featureNameEnabled()) | 6507 if (RuntimeEnabledFeatures::featureNameEnabled()) |
| 6508 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsRuntim
eEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perW
orldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined(), d
efaultSignature, 0)); | 6508 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsRuntim
eEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perW
orldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined(), d
efaultSignature, 0)); |
| 6509 } else { | 6509 } else { |
| 6510 if (RuntimeEnabledFeatures::featureNameEnabled()) | 6510 if (RuntimeEnabledFeatures::featureNameEnabled()) |
| 6511 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsRuntim
eEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perW
orldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignat
ure, 0)); | 6511 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsRuntim
eEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perW
orldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignat
ure, 0)); |
| 6512 } | 6512 } |
| 6513 instanceTemplate->Set(v8::String::NewSymbol("unforgeableVoidMethod"), v8::Fu
nctionTemplate::New(TestObjectPythonV8Internal::unforgeableVoidMethodMethodCallb
ack, v8Undefined(), defaultSignature, 0)); | 6513 instanceTemplate->Set(v8::String::NewSymbol("unforgeableVoidMethod"), v8::Fu
nctionTemplate::New(TestObjectPythonV8Internal::unforgeableVoidMethodMethodCallb
ack, v8Undefined(), defaultSignature, 0)); |
| 6514 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticStringA
ttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCall
back, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback,
v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v
8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 6514 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticStringA
ttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCall
back, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback,
v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8:
:Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 6515 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticLongAtt
ribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallback
, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8::Ex
ternal::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acc
essorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 6515 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticLongAtt
ribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallback
, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8::Ex
ternal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handl
e<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 6516 | 6516 |
| 6517 // Custom toString template | 6517 // Custom toString template |
| 6518 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); | 6518 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); |
| 6519 return functionTemplate; | 6519 return functionTemplate; |
| 6520 } | 6520 } |
| 6521 | 6521 |
| 6522 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::GetTemplate(v8::Isolate* is
olate, WrapperWorldType currentWorldType) | 6522 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::GetTemplate(v8::Isolate* is
olate, WrapperWorldType currentWorldType) |
| 6523 { | 6523 { |
| 6524 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 6524 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 6525 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); | 6525 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6586 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT
ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 6586 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT
ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 6587 return wrapper; | 6587 return wrapper; |
| 6588 } | 6588 } |
| 6589 | 6589 |
| 6590 void V8TestObjectPython::derefObject(void* object) | 6590 void V8TestObjectPython::derefObject(void* object) |
| 6591 { | 6591 { |
| 6592 fromInternalPointer(object)->deref(); | 6592 fromInternalPointer(object)->deref(); |
| 6593 } | 6593 } |
| 6594 | 6594 |
| 6595 } // namespace WebCore | 6595 } // namespace WebCore |
| OLD | NEW |