| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 54 namespace WebCore { | 54 namespace WebCore { |
| 55 #endif | 55 #endif |
| 56 WrapperTypeInfo V8TestNode::info = { V8TestNode::GetTemplate, V8TestNode::derefO
bject, 0, V8TestNode::toEventTarget, 0, V8TestNode::installPerContextPrototypePr
operties, &V8Node::info, WrapperTypeObjectPrototype }; | 56 WrapperTypeInfo V8TestNode::info = { V8TestNode::GetTemplate, V8TestNode::derefO
bject, 0, V8TestNode::toEventTarget, 0, V8TestNode::installPerContextPrototypePr
operties, &V8Node::info, WrapperTypeObjectPrototype }; |
| 57 | 57 |
| 58 namespace TestNodeV8Internal { | 58 namespace TestNodeV8Internal { |
| 59 | 59 |
| 60 template <typename T> void V8_USE(T) { } | 60 template <typename T> void V8_USE(T) { } |
| 61 | 61 |
| 62 static v8::Handle<v8::Value> constructor(const v8::Arguments& args) | 62 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 63 { | 63 { |
| 64 | 64 |
| 65 RefPtr<TestNode> impl = TestNode::create(); | 65 RefPtr<TestNode> impl = TestNode::create(); |
| 66 v8::Handle<v8::Object> wrapper = args.Holder(); | 66 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 67 | 67 |
| 68 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNode::info,
wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 68 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNode::info,
wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| 69 return wrapper; | 69 args.GetReturnValue().Set(wrapper); |
| 70 } | 70 } |
| 71 | 71 |
| 72 } // namespace TestNodeV8Internal | 72 } // namespace TestNodeV8Internal |
| 73 | 73 |
| 74 v8::Handle<v8::Value> V8TestNode::constructorCallback(const v8::Arguments& args) | 74 void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 75 { | 75 { |
| 76 if (!args.IsConstructCall()) | 76 if (!args.IsConstructCall()) { |
| 77 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); | 77 throwTypeError("DOM object constructor cannot be called as a function.",
args.GetIsolate()); |
| 78 return; |
| 79 } |
| 78 | 80 |
| 79 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) | 81 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 80 return args.Holder(); | 82 args.GetReturnValue().Set(args.Holder()); |
| 83 return; |
| 84 } |
| 81 | 85 |
| 82 return TestNodeV8Internal::constructor(args); | 86 TestNodeV8Internal::constructor(args); |
| 83 } | 87 } |
| 84 | 88 |
| 85 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Pers
istent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren
tWorldType) | 89 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Pers
istent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren
tWorldType) |
| 86 { | 90 { |
| 87 desc->ReadOnlyPrototype(); | 91 desc->ReadOnlyPrototype(); |
| 88 | 92 |
| 89 v8::Local<v8::Signature> defaultSignature; | 93 v8::Local<v8::Signature> defaultSignature; |
| 90 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V
8Node::GetTemplate(isolate, currentWorldType), V8TestNode::internalFieldCount, | 94 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V
8Node::GetTemplate(isolate, currentWorldType), V8TestNode::internalFieldCount, |
| 91 0, 0, | 95 0, 0, |
| 92 0, 0, isolate, currentWorldType); | 96 0, 0, isolate, currentWorldType); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 installPerContextProperties(wrapper, impl.get(), isolate); | 148 installPerContextProperties(wrapper, impl.get(), isolate); |
| 145 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Dependent); | 149 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Dependent); |
| 146 return wrapper; | 150 return wrapper; |
| 147 } | 151 } |
| 148 void V8TestNode::derefObject(void* object) | 152 void V8TestNode::derefObject(void* object) |
| 149 { | 153 { |
| 150 static_cast<TestNode*>(object)->deref(); | 154 static_cast<TestNode*>(object)->deref(); |
| 151 } | 155 } |
| 152 | 156 |
| 153 } // namespace WebCore | 157 } // namespace WebCore |
| OLD | NEW |