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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 namespace TestNodeV8Internal { | 61 namespace TestNodeV8Internal { |
62 | 62 |
63 template <typename T> void V8_USE(T) { } | 63 template <typename T> void V8_USE(T) { } |
64 | 64 |
65 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) | 65 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) |
66 { | 66 { |
67 | 67 |
68 RefPtr<TestNode> impl = TestNode::create(); | 68 RefPtr<TestNode> impl = TestNode::create(); |
69 v8::Handle<v8::Object> wrapper = args.Holder(); | 69 v8::Handle<v8::Object> wrapper = args.Holder(); |
70 | 70 |
71 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestNode::info,
wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 71 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl.release(), &V8Test
Node::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
72 args.GetReturnValue().Set(wrapper); | 72 args.GetReturnValue().Set(wrapper); |
73 } | 73 } |
74 | 74 |
75 } // namespace TestNodeV8Internal | 75 } // namespace TestNodeV8Internal |
76 | 76 |
77 void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) | 77 void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&
args) |
78 { | 78 { |
79 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 79 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
80 if (!args.IsConstructCall()) { | 80 if (!args.IsConstructCall()) { |
81 throwTypeError("DOM object constructor cannot be called as a function.",
args.GetIsolate()); | 81 throwTypeError("DOM object constructor cannot be called as a function.",
args.GetIsolate()); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) | 137 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) |
138 { | 138 { |
139 return toNative(object); | 139 return toNative(object); |
140 } | 140 } |
141 | 141 |
142 | 142 |
143 v8::Handle<v8::Object> V8TestNode::createWrapper(PassRefPtr<TestNode> impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 143 v8::Handle<v8::Object> V8TestNode::createWrapper(PassRefPtr<TestNode> impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
144 { | 144 { |
145 ASSERT(impl.get()); | 145 ASSERT(impl.get()); |
146 ASSERT(DOMDataStore::getWrapper(impl.get(), isolate).IsEmpty()); | 146 ASSERT(DOMDataStore::getWrapper<V8TestNode>(impl.get(), isolate).IsEmpty()); |
147 ASSERT(static_cast<void*>(static_cast<Node*>(impl.get())) == static_cast<voi
d*>(impl.get())); | |
148 | 147 |
149 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, impl.get(), isolate); | 148 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); |
150 if (UNLIKELY(wrapper.IsEmpty())) | 149 if (UNLIKELY(wrapper.IsEmpty())) |
151 return wrapper; | 150 return wrapper; |
152 installPerContextProperties(wrapper, impl.get(), isolate); | 151 installPerContextProperties(wrapper, impl.get(), isolate); |
153 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Dependent); | 152 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl, &info, wrapper, i
solate, WrapperConfiguration::Dependent); |
154 return wrapper; | 153 return wrapper; |
155 } | 154 } |
156 void V8TestNode::derefObject(void* object) | 155 void V8TestNode::derefObject(void* object) |
157 { | 156 { |
158 static_cast<TestNode*>(object)->deref(); | 157 fromInternalPointer(object)->deref(); |
159 } | 158 } |
160 | 159 |
161 } // namespace WebCore | 160 } // namespace WebCore |
OLD | NEW |