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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 static void initializedByEventConstructorReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 138 static void initializedByEventConstructorReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
139 { | 139 { |
140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
141 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon
lyLongAttributeAttributeGetter(info); | 141 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon
lyLongAttributeAttributeGetter(info); |
142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
143 } | 143 } |
144 | 144 |
145 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet
ter(const v8::PropertyCallbackInfo<v8::Value>& info) | 145 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet
ter(const v8::PropertyCallbackInfo<v8::Value>& info) |
146 { | 146 { |
147 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati
ve(info.Holder()); | 147 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati
ve(info.Holder()); |
148 RefPtr<Uint8Array> result = imp->initializedByEventConstructorReadonlyUint8A
rrayAttribute(); | 148 RefPtr<Uint8Array> result(imp->initializedByEventConstructorReadonlyUint8Arr
ayAttribute()); |
149 if (result && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.Get
ReturnValue(), result.get())) | 149 if (result && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.Get
ReturnValue(), result.get())) |
150 return; | 150 return; |
151 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 151 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
152 if (!wrapper.IsEmpty()) { | 152 if (!wrapper.IsEmpty()) { |
153 setHiddenValue(info.GetIsolate(), info.Holder(), "initializedByEventCons
tructorReadonlyUint8ArrayAttribute", wrapper); | 153 setHiddenValue(info.GetIsolate(), info.Holder(), "initializedByEventCons
tructorReadonlyUint8ArrayAttribute", wrapper); |
154 v8SetReturnValue(info, wrapper); | 154 v8SetReturnValue(info, wrapper); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet
terCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& in
fo) | 158 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet
terCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& in
fo) |
159 { | 159 { |
160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
161 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon
lyUint8ArrayAttributeAttributeGetter(info); | 161 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon
lyUint8ArrayAttributeAttributeGetter(info); |
162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
163 } | 163 } |
164 | 164 |
165 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr
ibuteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 165 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr
ibuteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
166 { | 166 { |
167 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati
ve(info.Holder()); | 167 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati
ve(info.Holder()); |
168 RefPtr<TestInterfaceEmpty> result = imp->initializedByEventConstructorReadon
lyTestInterfaceEmptyAttribute(); | 168 RefPtr<TestInterfaceEmpty> result(imp->initializedByEventConstructorReadonly
TestInterfaceEmptyAttribute()); |
169 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(
info.GetReturnValue(), result.get())) | 169 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(
info.GetReturnValue(), result.get())) |
170 return; | 170 return; |
171 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 171 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
172 if (!wrapper.IsEmpty()) { | 172 if (!wrapper.IsEmpty()) { |
173 setHiddenValue(info.GetIsolate(), info.Holder(), "initializedByEventCons
tructorReadonlyTestInterfaceEmptyAttribute", wrapper); | 173 setHiddenValue(info.GetIsolate(), info.Holder(), "initializedByEventCons
tructorReadonlyTestInterfaceEmptyAttribute", wrapper); |
174 v8SetReturnValue(info, wrapper); | 174 v8SetReturnValue(info, wrapper); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr
ibuteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 178 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr
ibuteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
(...skipping 18 matching lines...) Expand all Loading... |
197 | 197 |
198 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri
buteAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 198 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri
buteAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
199 { | 199 { |
200 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati
ve(info.Holder()); | 200 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati
ve(info.Holder()); |
201 bool isNull = false; | 201 bool isNull = false; |
202 RefPtr<TestInterfaceEmpty> jsValue = imp->initializedByEventConstructorReado
nlyNullableTestInterfaceEmptyAttribute(isNull); | 202 RefPtr<TestInterfaceEmpty> jsValue = imp->initializedByEventConstructorReado
nlyNullableTestInterfaceEmptyAttribute(isNull); |
203 if (isNull) { | 203 if (isNull) { |
204 v8SetReturnValueNull(info); | 204 v8SetReturnValueNull(info); |
205 return; | 205 return; |
206 } | 206 } |
207 RefPtr<TestInterfaceEmpty> result = jsValue; | 207 RefPtr<TestInterfaceEmpty> result(jsValue); |
208 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(
info.GetReturnValue(), result.get())) | 208 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(
info.GetReturnValue(), result.get())) |
209 return; | 209 return; |
210 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); | 210 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs
olate()); |
211 if (!wrapper.IsEmpty()) { | 211 if (!wrapper.IsEmpty()) { |
212 setHiddenValue(info.GetIsolate(), info.Holder(), "initializedByEventCons
tructorReadonlyNullableTestInterfaceEmptyAttribute", wrapper); | 212 setHiddenValue(info.GetIsolate(), info.Holder(), "initializedByEventCons
tructorReadonlyNullableTestInterfaceEmptyAttribute", wrapper); |
213 v8SetReturnValue(info, wrapper); | 213 v8SetReturnValue(info, wrapper); |
214 } | 214 } |
215 } | 215 } |
216 | 216 |
217 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri
buteAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) | 217 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri
buteAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 fromInternalPointer(object)->deref(); | 440 fromInternalPointer(object)->deref(); |
441 } | 441 } |
442 | 442 |
443 template<> | 443 template<> |
444 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 444 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
445 { | 445 { |
446 return toV8(impl, creationContext, isolate); | 446 return toV8(impl, creationContext, isolate); |
447 } | 447 } |
448 | 448 |
449 } // namespace WebCore | 449 } // namespace WebCore |
OLD | NEW |