Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXME comments. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceEventTarget.h" 8 #include "V8TestInterfaceEventTarget.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 TestInterfaceEventTarget* V8TestInterfaceEventTarget::toNativeWithTypeCheck(v8:: Isolate* isolate, v8::Handle<v8::Value> value) 121 TestInterfaceEventTarget* V8TestInterfaceEventTarget::toNativeWithTypeCheck(v8:: Isolate* isolate, v8::Handle<v8::Value> value)
122 { 122 {
123 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 123 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
124 } 124 }
125 125
126 EventTarget* V8TestInterfaceEventTarget::toEventTarget(v8::Handle<v8::Object> ob ject) 126 EventTarget* V8TestInterfaceEventTarget::toEventTarget(v8::Handle<v8::Object> ob ject)
127 { 127 {
128 return toNative(object); 128 return toNative(object);
129 } 129 }
130 130
131 v8::Handle<v8::Object> wrap(TestInterfaceEventTarget* impl, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate)
132 {
133 ASSERT(impl);
134 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventTarget>(impl, isol ate));
135 return V8TestInterfaceEventTarget::createWrapper(impl, creationContext, isol ate);
136 }
137
138 v8::Handle<v8::Object> V8TestInterfaceEventTarget::createWrapper(PassRefPtrWillB eRawPtr<TestInterfaceEventTarget> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
139 {
140 ASSERT(impl);
141 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventTarget>(impl.get() , isolate));
142 const WrapperTypeInfo* actualInfo = impl->typeInfo();
143 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
144 // the same object de-ref functions, though, so use that as the basis of the check.
145 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
146
147 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
148 if (UNLIKELY(wrapper.IsEmpty()))
149 return wrapper;
150
151 installConditionallyEnabledProperties(wrapper, isolate);
152 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventTarget>(impl, & wrapperTypeInfo, wrapper, isolate);
153 return wrapper;
154 }
155
156 131
157 void V8TestInterfaceEventTarget::refObject(ScriptWrappableBase* internalPointer) 132 void V8TestInterfaceEventTarget::refObject(ScriptWrappableBase* internalPointer)
158 { 133 {
159 #if !ENABLE(OILPAN) 134 #if !ENABLE(OILPAN)
160 fromInternalPointer(internalPointer)->ref(); 135 fromInternalPointer(internalPointer)->ref();
161 #endif 136 #endif
162 } 137 }
163 138
164 void V8TestInterfaceEventTarget::derefObject(ScriptWrappableBase* internalPointe r) 139 void V8TestInterfaceEventTarget::derefObject(ScriptWrappableBase* internalPointe r)
165 { 140 {
(...skipping 12 matching lines...) Expand all
178 #endif 153 #endif
179 } 154 }
180 155
181 template<> 156 template<>
182 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventTarget* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 157 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventTarget* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
183 { 158 {
184 return toV8(impl, creationContext, isolate); 159 return toV8(impl, creationContext, isolate);
185 } 160 }
186 161
187 } // namespace blink 162 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698