| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return static_cast<TestInterfaceWillBeGarbageCollected*>(V8EventTarget::
fromInternalPointer(object)); | 67 return static_cast<TestInterfaceWillBeGarbageCollected*>(V8EventTarget::
fromInternalPointer(object)); |
| 68 } | 68 } |
| 69 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceWillBeGarbageCollected*, v8::Isolate*) { } | 69 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI
nterfaceWillBeGarbageCollected*, v8::Isolate*) { } |
| 70 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } | 70 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol
ate*) { } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 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*); |
| 74 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
*); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 template<> | |
| 78 class WrapperTypeTraits<TestInterfaceWillBeGarbageCollected > { | |
| 79 public: | |
| 80 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestInterfaceWil
lBeGarbageCollected::wrapperTypeInfo; } | |
| 81 }; | |
| 82 | |
| 83 inline v8::Handle<v8::Object> wrap(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 77 inline v8::Handle<v8::Object> wrap(TestInterfaceWillBeGarbageCollected* impl, v8
::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 84 { | 78 { |
| 85 ASSERT(impl); | 79 ASSERT(impl); |
| 86 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceWillBeGarbageCollected>
(impl, isolate)); | 80 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceWillBeGarbageCollected>
(impl, isolate)); |
| 87 return V8TestInterfaceWillBeGarbageCollected::createWrapper(impl, creationCo
ntext, isolate); | 81 return V8TestInterfaceWillBeGarbageCollected::createWrapper(impl, creationCo
ntext, isolate); |
| 88 } | 82 } |
| 89 | 83 |
| 90 inline v8::Handle<v8::Value> toV8(TestInterfaceWillBeGarbageCollected* impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) | 84 inline v8::Handle<v8::Value> toV8(TestInterfaceWillBeGarbageCollected* impl, v8:
:Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 91 { | 85 { |
| 92 if (UNLIKELY(!impl)) | 86 if (UNLIKELY(!impl)) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 149 } |
| 156 | 150 |
| 157 template<class CallbackInfo, class Wrappable> | 151 template<class CallbackInfo, class Wrappable> |
| 158 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil
lBeRawPtr<TestInterfaceWillBeGarbageCollected> impl, Wrappable* wrappable) | 152 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil
lBeRawPtr<TestInterfaceWillBeGarbageCollected> impl, Wrappable* wrappable) |
| 159 { | 153 { |
| 160 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 154 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
| 161 } | 155 } |
| 162 | 156 |
| 163 } | 157 } |
| 164 #endif // V8TestInterfaceWillBeGarbageCollected_h | 158 #endif // V8TestInterfaceWillBeGarbageCollected_h |
| OLD | NEW |