| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 0, 0, | 530 0, 0, |
| 531 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), | 531 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), |
| 532 isolate, currentWorldType); | 532 isolate, currentWorldType); |
| 533 UNUSED_PARAM(defaultSignature); | 533 UNUSED_PARAM(defaultSignature); |
| 534 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback); | 534 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback); |
| 535 functionTemplate->SetLength(2); | 535 functionTemplate->SetLength(2); |
| 536 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 536 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 537 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 537 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 538 UNUSED_PARAM(instanceTemplate); | 538 UNUSED_PARAM(instanceTemplate); |
| 539 UNUSED_PARAM(prototypeTemplate); | 539 UNUSED_PARAM(prototypeTemplate); |
| 540 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("TestSubObj"),
TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, v8::External::New(con
st_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_cast<v8::Prop
ertyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), static_cast<v
8::AccessControl>(v8::DEFAULT)); | 540 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("TestSubObj"),
TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, v8::External::New(iso
late, const_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_cast
<v8::PropertyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), stat
ic_cast<v8::AccessControl>(v8::DEFAULT)); |
| 541 | 541 |
| 542 // Custom toString template | 542 // Custom toString template |
| 543 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); | 543 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c
urrent()->toStringTemplate()); |
| 544 return functionTemplate; | 544 return functionTemplate; |
| 545 } | 545 } |
| 546 | 546 |
| 547 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolat
e, WrapperWorldType currentWorldType) | 547 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolat
e, WrapperWorldType currentWorldType) |
| 548 { | 548 { |
| 549 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 549 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 550 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); | 550 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI
nfo, wrapper, isolate, WrapperConfiguration::Independent); | 590 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI
nfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 591 return wrapper; | 591 return wrapper; |
| 592 } | 592 } |
| 593 | 593 |
| 594 void V8TestTypedefs::derefObject(void* object) | 594 void V8TestTypedefs::derefObject(void* object) |
| 595 { | 595 { |
| 596 fromInternalPointer(object)->deref(); | 596 fromInternalPointer(object)->deref(); |
| 597 } | 597 } |
| 598 | 598 |
| 599 } // namespace WebCore | 599 } // namespace WebCore |
| OLD | NEW |