| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 440 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 441 { | 441 { |
| 442 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 442 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 443 TestObjV8Internal::stringAttrAttributeSetter(jsValue, info); | 443 TestObjV8Internal::stringAttrAttributeSetter(jsValue, info); |
| 444 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 444 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 445 } | 445 } |
| 446 | 446 |
| 447 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 447 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
| 448 { | 448 { |
| 449 TestObj* imp = V8TestObject::toNative(info.Holder()); | 449 TestObj* imp = V8TestObject::toNative(info.Holder()); |
| 450 EventListener* jsValue = imp->eventHandlerAttr(isolatedWorldForIsolate(info.
GetIsolate())); | 450 RefPtr<EventListener> listener = imp->eventHandlerAttr(isolatedWorldForIsola
te(info.GetIsolate())); |
| 451 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); | 451 v8SetReturnValue(info, listener); |
| 452 } | 452 } |
| 453 | 453 |
| 454 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 454 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 455 { | 455 { |
| 456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 457 TestObjV8Internal::eventHandlerAttrAttributeGetter(info); | 457 TestObjV8Internal::eventHandlerAttrAttributeGetter(info); |
| 458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 459 } | 459 } |
| 460 | 460 |
| 461 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 461 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
| (...skipping 5007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5469 fromInternalPointer(object)->deref(); | 5469 fromInternalPointer(object)->deref(); |
| 5470 } | 5470 } |
| 5471 | 5471 |
| 5472 template<> | 5472 template<> |
| 5473 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 5473 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
| 5474 { | 5474 { |
| 5475 return toV8(impl, creationContext, isolate); | 5475 return toV8(impl, creationContext, isolate); |
| 5476 } | 5476 } |
| 5477 | 5477 |
| 5478 } // namespace WebCore | 5478 } // namespace WebCore |
| OLD | NEW |