| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 112 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 113 { | 113 { |
| 114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 115 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); | 115 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); |
| 116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 117 } | 117 } |
| 118 | 118 |
| 119 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 119 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 120 { | 120 { |
| 121 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 121 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
| 122 EventListener* jsValue = imp->eventHandlerAttribute(isolatedWorldForIsolate(
info.GetIsolate())); | 122 EventListener* jsValue = imp->eventHandlerAttribute(); |
| 123 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); | 123 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); |
| 124 } | 124 } |
| 125 | 125 |
| 126 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 126 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 127 { | 127 { |
| 128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 129 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); | 129 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); |
| 130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 131 } | 131 } |
| 132 | 132 |
| 133 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 133 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
| 134 { | 134 { |
| 135 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 135 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); |
| 136 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue,
true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate())); | 136 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue,
true, ListenerFindOrCreate)); |
| 137 } | 137 } |
| 138 | 138 |
| 139 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 139 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 140 { | 140 { |
| 141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 141 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 142 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); | 142 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); |
| 143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 144 } | 144 } |
| 145 | 145 |
| 146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 146 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 fromInternalPointer(object)->deref(); | 385 fromInternalPointer(object)->deref(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 template<> | 388 template<> |
| 389 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) | 389 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) |
| 390 { | 390 { |
| 391 return toV8(impl, creationContext, isolate); | 391 return toV8(impl, creationContext, isolate); |
| 392 } | 392 } |
| 393 | 393 |
| 394 } // namespace WebCore | 394 } // namespace WebCore |
| OLD | NEW |