| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 32 | 32 |
| 33 #ifndef V8TestInterfaceWillBeGarbageCollected_h | 33 #ifndef V8TestInterfaceWillBeGarbageCollected_h |
| 34 #define V8TestInterfaceWillBeGarbageCollected_h | 34 #define V8TestInterfaceWillBeGarbageCollected_h |
| 35 | 35 |
| 36 #include "V8EventTarget.h" |
| 36 #include "bindings/tests/idls/TestInterfaceWillBeGarbageCollected.h" | 37 #include "bindings/tests/idls/TestInterfaceWillBeGarbageCollected.h" |
| 37 #include "bindings/v8/V8Binding.h" | 38 #include "bindings/v8/V8Binding.h" |
| 38 #include "bindings/v8/V8DOMWrapper.h" | 39 #include "bindings/v8/V8DOMWrapper.h" |
| 39 #include "bindings/v8/WrapperTypeInfo.h" | 40 #include "bindings/v8/WrapperTypeInfo.h" |
| 40 #include "heap/Handle.h" | 41 #include "heap/Handle.h" |
| 41 | 42 |
| 42 namespace WebCore { | 43 namespace WebCore { |
| 43 | 44 |
| 44 class V8TestInterfaceWillBeGarbageCollected { | 45 class V8TestInterfaceWillBeGarbageCollected { |
| 45 public: | 46 public: |
| 46 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 47 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
| 47 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor
ldType); | 48 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor
ldType); |
| 48 static TestInterfaceWillBeGarbageCollected* toNative(v8::Handle<v8::Object>
object) | 49 static TestInterfaceWillBeGarbageCollected* toNative(v8::Handle<v8::Object>
object) |
| 49 { | 50 { |
| 50 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); | 51 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
| 51 } | 52 } |
| 52 static const WrapperTypeInfo wrapperTypeInfo; | 53 static const WrapperTypeInfo wrapperTypeInfo; |
| 53 static void derefObject(void*); | 54 static void derefObject(void*); |
| 55 static EventTarget* toEventTarget(v8::Handle<v8::Object>); |
| 54 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 56 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 55 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount
+ 0; | 57 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCoun
t + 0; |
| 56 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1
; | 58 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount
+ 1; |
| 59 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 2
; |
| 57 static inline void* toInternalPointer(TestInterfaceWillBeGarbageCollected* i
mpl) | 60 static inline void* toInternalPointer(TestInterfaceWillBeGarbageCollected* i
mpl) |
| 58 { | 61 { |
| 59 return impl; | 62 return V8EventTarget::toInternalPointer(impl); |
| 60 } | 63 } |
| 61 | 64 |
| 62 static inline TestInterfaceWillBeGarbageCollected* fromInternalPointer(void*
object) | 65 static inline TestInterfaceWillBeGarbageCollected* fromInternalPointer(void*
object) |
| 63 { | 66 { |
| 64 return static_cast<TestInterfaceWillBeGarbageCollected*>(object); | 67 return static_cast<TestInterfaceWillBeGarbageCollected*>(V8EventTarget::
fromInternalPointer(object)); |
| 65 } | 68 } |
| 66 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceWillBeGarbageCollected*, v8::Isolate*) { } | 69 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceWillBeGarbageCollected*, v8::Isolate*) { } |
| 67 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 70 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
| 68 | 71 |
| 69 private: | 72 private: |
| 70 friend v8::Handle<v8::Object> wrap(TestInterfaceWillBeGarbageCollected*, v8:
:Handle<v8::Object> creationContext, v8::Isolate*); | 73 friend v8::Handle<v8::Object> wrap(TestInterfaceWillBeGarbageCollected*, v8:
:Handle<v8::Object> creationContext, v8::Isolate*); |
| 71 static v8::Handle<v8::Object> createWrapper(PassRefPtrWillBeRawPtr<TestInter
faceWillBeGarbageCollected>, v8::Handle<v8::Object> creationContext, v8::Isolate
*); | 74 static v8::Handle<v8::Object> createWrapper(PassRefPtrWillBeRawPtr<TestInter
faceWillBeGarbageCollected>, v8::Handle<v8::Object> creationContext, v8::Isolate
*); |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 template<> | 77 template<> |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 155 } |
| 153 | 156 |
| 154 template<class CallbackInfo, class Wrappable> | 157 template<class CallbackInfo, class Wrappable> |
| 155 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil
lBeRawPtr<TestInterfaceWillBeGarbageCollected> impl, Wrappable* wrappable) | 158 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil
lBeRawPtr<TestInterfaceWillBeGarbageCollected> impl, Wrappable* wrappable) |
| 156 { | 159 { |
| 157 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 160 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 158 } | 161 } |
| 159 | 162 |
| 160 } | 163 } |
| 161 #endif // V8TestInterfaceWillBeGarbageCollected_h | 164 #endif // V8TestInterfaceWillBeGarbageCollected_h |
| OLD | NEW |