| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the WebKit open source project. | 2 This file is part of the WebKit open source project. |
| 3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! | 3 This file has been generated by generate-bindings.pl. 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 WrapperTypeInfo V8TestNamedConstructor::info = { V8TestNamedConstructor::GetTemp
late, V8TestNamedConstructor::derefObject, V8TestNamedConstructor::toActiveDOMOb
ject, 0, 0, V8TestNamedConstructor::installPerContextPrototypeProperties, 0, Wra
pperTypeObjectPrototype }; | 67 WrapperTypeInfo V8TestNamedConstructor::info = { V8TestNamedConstructor::GetTemp
late, V8TestNamedConstructor::derefObject, V8TestNamedConstructor::toActiveDOMOb
ject, 0, 0, V8TestNamedConstructor::installPerContextPrototypeProperties, 0, Wra
pperTypeObjectPrototype }; |
| 68 | 68 |
| 69 namespace TestNamedConstructorV8Internal { | 69 namespace TestNamedConstructorV8Internal { |
| 70 | 70 |
| 71 template <typename T> void V8_USE(T) { } | 71 template <typename T> void V8_USE(T) { } |
| 72 | 72 |
| 73 } // namespace TestNamedConstructorV8Internal | 73 } // namespace TestNamedConstructorV8Internal |
| 74 | 74 |
| 75 WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstruct
orConstructor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedCons
tructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextProto
typeProperties, 0, WrapperTypeObjectPrototype }; | 75 WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstruct
orConstructor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedCons
tructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextProto
typeProperties, 0, WrapperTypeObjectPrototype }; |
| 76 | 76 |
| 77 static v8::Handle<v8::Value> namedConstructor(const v8::Arguments& args) | 77 static v8::Handle<v8::Value> V8TestNamedConstructorConstructorCallback(const v8:
:Arguments& args) |
| 78 { | 78 { |
| 79 |
| 79 if (!args.IsConstructCall()) | 80 if (!args.IsConstructCall()) |
| 80 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); | 81 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); |
| 81 | 82 |
| 82 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) | 83 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) |
| 83 return args.Holder(); | 84 return args.Holder(); |
| 84 | 85 |
| 85 Document* document = currentDocument(BindingState::instance()); | 86 Document* document = currentDocument(BindingState::instance()); |
| 86 | 87 |
| 87 // Make sure the document is added to the DOM Node map. Otherwise, the TestN
amedConstructor instance | 88 // Make sure the document is added to the DOM Node map. Otherwise, the TestN
amedConstructor instance |
| 88 // may end up being the only node in the map and get garbage-collected prema
turely. | 89 // may end up being the only node in the map and get garbage-collected prema
turely. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 100 v8::Handle<v8::Object> wrapper = args.Holder(); | 101 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 101 if (ec) | 102 if (ec) |
| 102 goto fail; | 103 goto fail; |
| 103 | 104 |
| 104 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNamedConstru
ctorConstructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Depende
nt); | 105 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNamedConstru
ctorConstructor::info, wrapper, args.GetIsolate(), WrapperConfiguration::Depende
nt); |
| 105 return wrapper; | 106 return wrapper; |
| 106 fail: | 107 fail: |
| 107 return setDOMException(ec, args.GetIsolate()); | 108 return setDOMException(ec, args.GetIsolate()); |
| 108 } | 109 } |
| 109 | 110 |
| 110 static v8::Handle<v8::Value> namedConstructorCallback(const v8::Arguments& args) | |
| 111 { | |
| 112 return namedConstructor(args); | |
| 113 } | |
| 114 | |
| 115 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTempl
ate(v8::Isolate* isolate) | 111 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTempl
ate(v8::Isolate* isolate) |
| 116 { | 112 { |
| 117 static v8::Persistent<v8::FunctionTemplate> cachedTemplate; | 113 static v8::Persistent<v8::FunctionTemplate> cachedTemplate; |
| 118 if (!cachedTemplate.IsEmpty()) | 114 if (!cachedTemplate.IsEmpty()) |
| 119 return cachedTemplate; | 115 return cachedTemplate; |
| 120 | 116 |
| 121 v8::HandleScope scope; | 117 v8::HandleScope scope; |
| 122 v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(namedCons
tructorCallback); | 118 v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(V8TestNam
edConstructorConstructorCallback); |
| 123 | 119 |
| 124 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate(); | 120 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate(); |
| 125 instance->SetInternalFieldCount(V8TestNamedConstructor::internalFieldCount); | 121 instance->SetInternalFieldCount(V8TestNamedConstructor::internalFieldCount); |
| 126 result->SetClassName(v8::String::NewSymbol("TestNamedConstructor")); | 122 result->SetClassName(v8::String::NewSymbol("TestNamedConstructor")); |
| 127 result->Inherit(V8TestNamedConstructor::GetTemplate(isolate)); | 123 result->Inherit(V8TestNamedConstructor::GetTemplate(isolate)); |
| 128 | 124 |
| 129 cachedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, result); | 125 cachedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, result); |
| 130 return cachedTemplate; | 126 return cachedTemplate; |
| 131 } | 127 } |
| 132 | 128 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 installPerContextProperties(wrapper, impl.get(), isolate); | 196 installPerContextProperties(wrapper, impl.get(), isolate); |
| 201 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); | 197 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); |
| 202 return wrapper; | 198 return wrapper; |
| 203 } | 199 } |
| 204 void V8TestNamedConstructor::derefObject(void* object) | 200 void V8TestNamedConstructor::derefObject(void* object) |
| 205 { | 201 { |
| 206 static_cast<TestNamedConstructor*>(object)->deref(); | 202 static_cast<TestNamedConstructor*>(object)->deref(); |
| 207 } | 203 } |
| 208 | 204 |
| 209 } // namespace WebCore | 205 } // namespace WebCore |
| OLD | NEW |