| OLD | NEW |
| 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 #ifndef V8TestInterfaceEventTarget_h | 7 #ifndef V8TestInterfaceEventTarget_h |
| 8 #define V8TestInterfaceEventTarget_h | 8 #define V8TestInterfaceEventTarget_h |
| 9 | 9 |
| 10 #include "bindings/tests/idls/TestInterfaceEventTarget.h" | 10 #include "bindings/tests/idls/TestInterfaceEventTarget.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | 29 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
| 30 static TestInterfaceEventTarget* toNative(v8::Handle<v8::Object> object) | 30 static TestInterfaceEventTarget* toNative(v8::Handle<v8::Object> object) |
| 31 { | 31 { |
| 32 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 32 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
| 33 } | 33 } |
| 34 static TestInterfaceEventTarget* toNativeWithTypeCheck(v8::Isolate*, v8::Han
dle<v8::Value>); | 34 static TestInterfaceEventTarget* toNativeWithTypeCheck(v8::Isolate*, v8::Han
dle<v8::Value>); |
| 35 static const WrapperTypeInfo wrapperTypeInfo; | 35 static const WrapperTypeInfo wrapperTypeInfo; |
| 36 static void derefObject(void*); | 36 static void derefObject(void*); |
| 37 static EventTarget* toEventTarget(v8::Handle<v8::Object>); | 37 static EventTarget* toEventTarget(v8::Handle<v8::Object>); |
| 38 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + 0; | 38 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + 0; |
| 39 #if ENABLE(OILPAN) |
| 40 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount
+ 1; |
| 41 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1
+ 1; |
| 42 #else |
| 39 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1
; | 43 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1
; |
| 44 #endif |
| 40 static inline void* toInternalPointer(TestInterfaceEventTarget* impl) | 45 static inline void* toInternalPointer(TestInterfaceEventTarget* impl) |
| 41 { | 46 { |
| 42 return V8EventTarget::toInternalPointer(impl); | 47 return V8EventTarget::toInternalPointer(impl); |
| 43 } | 48 } |
| 44 | 49 |
| 45 static inline TestInterfaceEventTarget* fromInternalPointer(void* object) | 50 static inline TestInterfaceEventTarget* fromInternalPointer(void* object) |
| 46 { | 51 { |
| 47 return static_cast<TestInterfaceEventTarget*>(V8EventTarget::fromInterna
lPointer(object)); | 52 return static_cast<TestInterfaceEventTarget*>(V8EventTarget::fromInterna
lPointer(object)); |
| 48 } | 53 } |
| 49 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceEventTarget*, v8::Isolate*) { } | 54 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceEventTarget*, v8::Isolate*) { } |
| 50 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 55 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
| 51 | 56 |
| 52 private: | 57 private: |
| 53 friend v8::Handle<v8::Object> wrap(TestInterfaceEventTarget*, v8::Handle<v8:
:Object> creationContext, v8::Isolate*); | 58 friend v8::Handle<v8::Object> wrap(TestInterfaceEventTarget*, v8::Handle<v8:
:Object> creationContext, v8::Isolate*); |
| 54 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceEventTar
get>, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 59 static v8::Handle<v8::Object> createWrapper(PassRefPtrWillBeRawPtr<TestInter
faceEventTarget>, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
| 55 }; | 60 }; |
| 56 | 61 |
| 57 inline v8::Handle<v8::Object> wrap(TestInterfaceEventTarget* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 62 inline v8::Handle<v8::Object> wrap(TestInterfaceEventTarget* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
| 58 { | 63 { |
| 59 ASSERT(impl); | 64 ASSERT(impl); |
| 60 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventTarget>(impl, isol
ate)); | 65 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventTarget>(impl, isol
ate)); |
| 61 return V8TestInterfaceEventTarget::createWrapper(impl, creationContext, isol
ate); | 66 return V8TestInterfaceEventTarget::createWrapper(impl, creationContext, isol
ate); |
| 62 } | 67 } |
| 63 | 68 |
| 64 inline v8::Handle<v8::Value> toV8(TestInterfaceEventTarget* impl, v8::Handle<v8:
:Object> creationContext, v8::Isolate* isolate) | 69 inline v8::Handle<v8::Value> toV8(TestInterfaceEventTarget* impl, v8::Handle<v8:
:Object> creationContext, v8::Isolate* isolate) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 if (UNLIKELY(!impl)) { | 109 if (UNLIKELY(!impl)) { |
| 105 v8SetReturnValueNull(callbackInfo); | 110 v8SetReturnValueNull(callbackInfo); |
| 106 return; | 111 return; |
| 107 } | 112 } |
| 108 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceEventTarget>(
callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) | 113 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceEventTarget>(
callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) |
| 109 return; | 114 return; |
| 110 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); | 115 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI
nfo.GetIsolate()); |
| 111 v8SetReturnValue(callbackInfo, wrapper); | 116 v8SetReturnValue(callbackInfo, wrapper); |
| 112 } | 117 } |
| 113 | 118 |
| 114 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceEventTarget> impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) | 119 inline v8::Handle<v8::Value> toV8(PassRefPtrWillBeRawPtr<TestInterfaceEventTarge
t> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 115 { | 120 { |
| 116 return toV8(impl.get(), creationContext, isolate); | 121 return toV8(impl.get(), creationContext, isolate); |
| 117 } | 122 } |
| 118 | 123 |
| 119 template<class CallbackInfo> | 124 template<class CallbackInfo> |
| 120 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn
terfaceEventTarget> impl) | 125 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtrWillBeR
awPtr<TestInterfaceEventTarget> impl) |
| 121 { | 126 { |
| 122 v8SetReturnValue(callbackInfo, impl.get()); | 127 v8SetReturnValue(callbackInfo, impl.get()); |
| 123 } | 128 } |
| 124 | 129 |
| 125 template<class CallbackInfo> | 130 template<class CallbackInfo> |
| 126 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtr<TestInterfaceEventTarget> impl) | 131 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR
efPtrWillBeRawPtr<TestInterfaceEventTarget> impl) |
| 127 { | 132 { |
| 128 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); | 133 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); |
| 129 } | 134 } |
| 130 | 135 |
| 131 template<class CallbackInfo, class Wrappable> | 136 template<class CallbackInfo, class Wrappable> |
| 132 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te
stInterfaceEventTarget> impl, Wrappable* wrappable) | 137 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil
lBeRawPtr<TestInterfaceEventTarget> impl, Wrappable* wrappable) |
| 133 { | 138 { |
| 134 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 139 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 135 } | 140 } |
| 136 | 141 |
| 137 } | 142 } |
| 138 #endif // V8TestInterfaceEventTarget_h | 143 #endif // V8TestInterfaceEventTarget_h |
| OLD | NEW |