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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 215 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
216 { | 216 { |
217 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); | 217 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); |
218 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "TestSpe
cialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate()); | 218 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "TestSpe
cialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate()); |
219 RefPtr<TestInterfaceEmpty> result = imp->item(index, exceptionState); | 219 RefPtr<TestInterfaceEmpty> result = imp->item(index, exceptionState); |
220 if (exceptionState.throwIfNeeded()) | 220 if (exceptionState.throwIfNeeded()) |
221 return; | 221 return; |
222 if (!result) | 222 if (!result) |
223 return; | 223 return; |
224 v8SetReturnValueFast(info, result.release(), imp); | 224 v8SetReturnValueFast(info, WTF::getPtr(result.release()), imp); |
225 } | 225 } |
226 | 226 |
227 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 227 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
228 { | 228 { |
229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
230 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyGet
ter(index, info); | 230 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyGet
ter(index, info); |
231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
232 } | 232 } |
233 | 233 |
234 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) | 234 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); | 279 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); |
280 AtomicString propertyName = toCoreAtomicString(name); | 280 AtomicString propertyName = toCoreAtomicString(name); |
281 v8::String::Utf8Value namedProperty(name); | 281 v8::String::Utf8Value namedProperty(name); |
282 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolat
e()); | 282 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolat
e()); |
283 RefPtr<TestInterfaceEmpty> result = imp->namedItem(propertyName, exceptionSt
ate); | 283 RefPtr<TestInterfaceEmpty> result = imp->namedItem(propertyName, exceptionSt
ate); |
284 if (exceptionState.throwIfNeeded()) | 284 if (exceptionState.throwIfNeeded()) |
285 return; | 285 return; |
286 if (!result) | 286 if (!result) |
287 return; | 287 return; |
288 v8SetReturnValueFast(info, result.release(), imp); | 288 v8SetReturnValueFast(info, WTF::getPtr(result.release()), imp); |
289 } | 289 } |
290 | 290 |
291 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 291 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
292 { | 292 { |
293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
294 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyGette
r(name, info); | 294 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyGette
r(name, info); |
295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
296 } | 296 } |
297 | 297 |
298 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 298 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 fromInternalPointer(object)->deref(); | 468 fromInternalPointer(object)->deref(); |
469 } | 469 } |
470 | 470 |
471 template<> | 471 template<> |
472 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsIdentifierRaisesExceptio
n* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 472 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsIdentifierRaisesExceptio
n* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
473 { | 473 { |
474 return toV8(impl, creationContext, isolate); | 474 return toV8(impl, creationContext, isolate); |
475 } | 475 } |
476 | 476 |
477 } // namespace WebCore | 477 } // namespace WebCore |
OLD | NEW |