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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceEventConstructor.h

Issue 182763002: Add [WillBeGarbageCollected] to Event.idl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 /* 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*); 49 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*);
50 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType); 50 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*, WrapperWor ldType);
51 static TestInterfaceEventConstructor* toNative(v8::Handle<v8::Object> object ) 51 static TestInterfaceEventConstructor* toNative(v8::Handle<v8::Object> object )
52 { 52 {
53 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex)); 53 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8 DOMWrapperObjectIndex));
54 } 54 }
55 static TestInterfaceEventConstructor* toNativeWithTypeCheck(v8::Isolate*, v8 ::Handle<v8::Value>); 55 static TestInterfaceEventConstructor* toNativeWithTypeCheck(v8::Isolate*, v8 ::Handle<v8::Value>);
56 static const WrapperTypeInfo wrapperTypeInfo; 56 static const WrapperTypeInfo wrapperTypeInfo;
57 static void derefObject(void*); 57 static void derefObject(void*);
58 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); 58 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
59 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ; 59 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount + 0;
60 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1 ;
60 static inline void* toInternalPointer(TestInterfaceEventConstructor* impl) 61 static inline void* toInternalPointer(TestInterfaceEventConstructor* impl)
61 { 62 {
62 return V8Event::toInternalPointer(impl); 63 return V8Event::toInternalPointer(impl);
63 } 64 }
64 65
65 static inline TestInterfaceEventConstructor* fromInternalPointer(void* objec t) 66 static inline TestInterfaceEventConstructor* fromInternalPointer(void* objec t)
66 { 67 {
67 return static_cast<TestInterfaceEventConstructor*>(V8Event::fromInternal Pointer(object)); 68 return static_cast<TestInterfaceEventConstructor*>(V8Event::fromInternal Pointer(object));
68 } 69 }
69 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceEventConstructor*, v8::Isolate*) { } 70 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceEventConstructor*, v8::Isolate*) { }
70 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 71 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
71 72
72 private: 73 private:
73 friend v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor*, v8::Handl e<v8::Object> creationContext, v8::Isolate*); 74 friend v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor*, v8::Handl e<v8::Object> creationContext, v8::Isolate*);
74 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceEventCon structor>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 75 static v8::Handle<v8::Object> createWrapper(PassRefPtrWillBeRawPtr<TestInter faceEventConstructor>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
75 }; 76 };
76 77
77 inline v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 78 inline v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
78 { 79 {
79 ASSERT(impl); 80 ASSERT(impl);
80 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl, isolate)); 81 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl, isolate));
81 return V8TestInterfaceEventConstructor::createWrapper(impl, creationContext, isolate); 82 return V8TestInterfaceEventConstructor::createWrapper(impl, creationContext, isolate);
82 } 83 }
83 84
84 inline v8::Handle<v8::Value> toV8(TestInterfaceEventConstructor* impl, v8::Handl e<v8::Object> creationContext, v8::Isolate* isolate) 85 inline v8::Handle<v8::Value> toV8(TestInterfaceEventConstructor* impl, v8::Handl e<v8::Object> creationContext, v8::Isolate* isolate)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (UNLIKELY(!impl)) { 125 if (UNLIKELY(!impl)) {
125 v8SetReturnValueNull(callbackInfo); 126 v8SetReturnValueNull(callbackInfo);
126 return; 127 return;
127 } 128 }
128 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceEventConstruc tor>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceEventConstruc tor>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
129 return; 130 return;
130 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
131 v8SetReturnValue(callbackInfo, wrapper); 132 v8SetReturnValue(callbackInfo, wrapper);
132 } 133 }
133 134
134 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceEventConstructor> impl , v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 135 inline v8::Handle<v8::Value> toV8(PassRefPtrWillBeRawPtr<TestInterfaceEventConst ructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
135 { 136 {
136 return toV8(impl.get(), creationContext, isolate); 137 return toV8(impl.get(), creationContext, isolate);
137 } 138 }
138 139
139 template<class CallbackInfo> 140 template<class CallbackInfo>
140 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceEventConstructor> impl) 141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtrWillBeR awPtr<TestInterfaceEventConstructor> impl)
141 { 142 {
142 v8SetReturnValue(callbackInfo, impl.get()); 143 v8SetReturnValue(callbackInfo, impl.get());
143 } 144 }
144 145
145 template<class CallbackInfo> 146 template<class CallbackInfo>
146 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceEventConstructor> impl) 147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtrWillBeRawPtr<TestInterfaceEventConstructor> impl)
147 { 148 {
148 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 149 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
149 } 150 }
150 151
151 template<class CallbackInfo, class Wrappable> 152 template<class CallbackInfo, class Wrappable>
152 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceEventConstructor> impl, Wrappable* wrappable) 153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil lBeRawPtr<TestInterfaceEventConstructor> impl, Wrappable* wrappable)
153 { 154 {
154 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
155 } 156 }
156 157
157 bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); 158 bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = "");
158 159
159 } 160 }
160 #endif // V8TestInterfaceEventConstructor_h 161 #endif // V8TestInterfaceEventConstructor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698