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

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

Issue 185393006: Revert "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 persistentHandleIndex = v8DefaultWrapperInternalFieldCount + 0; 59 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0 ;
60 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1 ;
61 static inline void* toInternalPointer(TestInterfaceEventConstructor* impl) 60 static inline void* toInternalPointer(TestInterfaceEventConstructor* impl)
62 { 61 {
63 return V8Event::toInternalPointer(impl); 62 return V8Event::toInternalPointer(impl);
64 } 63 }
65 64
66 static inline TestInterfaceEventConstructor* fromInternalPointer(void* objec t) 65 static inline TestInterfaceEventConstructor* fromInternalPointer(void* objec t)
67 { 66 {
68 return static_cast<TestInterfaceEventConstructor*>(V8Event::fromInternal Pointer(object)); 67 return static_cast<TestInterfaceEventConstructor*>(V8Event::fromInternal Pointer(object));
69 } 68 }
70 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceEventConstructor*, v8::Isolate*) { } 69 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestI nterfaceEventConstructor*, v8::Isolate*) { }
71 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 70 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
72 71
73 private: 72 private:
74 friend v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor*, v8::Handl e<v8::Object> creationContext, v8::Isolate*); 73 friend v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor*, v8::Handl e<v8::Object> creationContext, v8::Isolate*);
75 static v8::Handle<v8::Object> createWrapper(PassRefPtrWillBeRawPtr<TestInter faceEventConstructor>, v8::Handle<v8::Object> creationContext, v8::Isolate*); 74 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestInterfaceEventCon structor>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
76 }; 75 };
77 76
78 inline v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 77 inline v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
79 { 78 {
80 ASSERT(impl); 79 ASSERT(impl);
81 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl, isolate)); 80 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl, isolate));
82 return V8TestInterfaceEventConstructor::createWrapper(impl, creationContext, isolate); 81 return V8TestInterfaceEventConstructor::createWrapper(impl, creationContext, isolate);
83 } 82 }
84 83
85 inline v8::Handle<v8::Value> toV8(TestInterfaceEventConstructor* impl, v8::Handl e<v8::Object> creationContext, v8::Isolate* isolate) 84 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
125 if (UNLIKELY(!impl)) { 124 if (UNLIKELY(!impl)) {
126 v8SetReturnValueNull(callbackInfo); 125 v8SetReturnValueNull(callbackInfo);
127 return; 126 return;
128 } 127 }
129 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceEventConstruc tor>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable)) 128 if (DOMDataStore::setReturnValueFromWrapperFast<V8TestInterfaceEventConstruc tor>(callbackInfo.GetReturnValue(), impl, callbackInfo.Holder(), wrappable))
130 return; 129 return;
131 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate()); 130 v8::Handle<v8::Object> wrapper = wrap(impl, callbackInfo.Holder(), callbackI nfo.GetIsolate());
132 v8SetReturnValue(callbackInfo, wrapper); 131 v8SetReturnValue(callbackInfo, wrapper);
133 } 132 }
134 133
135 inline v8::Handle<v8::Value> toV8(PassRefPtrWillBeRawPtr<TestInterfaceEventConst ructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 134 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterfaceEventConstructor> impl , v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
136 { 135 {
137 return toV8(impl.get(), creationContext, isolate); 136 return toV8(impl.get(), creationContext, isolate);
138 } 137 }
139 138
140 template<class CallbackInfo> 139 template<class CallbackInfo>
141 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtrWillBeR awPtr<TestInterfaceEventConstructor> impl) 140 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestIn terfaceEventConstructor> impl)
142 { 141 {
143 v8SetReturnValue(callbackInfo, impl.get()); 142 v8SetReturnValue(callbackInfo, impl.get());
144 } 143 }
145 144
146 template<class CallbackInfo> 145 template<class CallbackInfo>
147 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtrWillBeRawPtr<TestInterfaceEventConstructor> impl) 146 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassR efPtr<TestInterfaceEventConstructor> impl)
148 { 147 {
149 v8SetReturnValueForMainWorld(callbackInfo, impl.get()); 148 v8SetReturnValueForMainWorld(callbackInfo, impl.get());
150 } 149 }
151 150
152 template<class CallbackInfo, class Wrappable> 151 template<class CallbackInfo, class Wrappable>
153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtrWil lBeRawPtr<TestInterfaceEventConstructor> impl, Wrappable* wrappable) 152 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stInterfaceEventConstructor> impl, Wrappable* wrappable)
154 { 153 {
155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 154 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
156 } 155 }
157 156
158 bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); 157 bool initializeTestInterfaceEventConstructor(TestInterfaceEventConstructorInit&, const Dictionary&, ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = "");
159 158
160 } 159 }
161 #endif // V8TestInterfaceEventConstructor_h 160 #endif // V8TestInterfaceEventConstructor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698