| 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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8:
:PropertyCallbackInfo<void>& info) | 1037 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8:
:PropertyCallbackInfo<void>& info) |
| 1038 { | 1038 { |
| 1039 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 1039 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 1040 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 1040 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
| 1041 imp->setNodeAttribute(WTF::getPtr(cppValue)); | 1041 imp->setNodeAttribute(WTF::getPtr(cppValue)); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1044 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 1045 { | 1045 { |
| 1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 1047 if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo)) | |
| 1048 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa
rameter); | |
| 1049 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info); | 1047 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info); |
| 1050 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1051 } | 1049 } |
| 1052 | 1050 |
| 1053 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1051 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1054 { | 1052 { |
| 1055 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 1053 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 1056 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp); | 1054 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp); |
| 1057 } | 1055 } |
| 1058 | 1056 |
| (...skipping 3023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4082 return; | 4080 return; |
| 4083 } | 4081 } |
| 4084 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4082 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 4085 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::hasInstance(info[0], info.GetIsolate
(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cas
t(info[0])) : 0); | 4083 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::hasInstance(info[0], info.GetIsolate
(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cas
t(info[0])) : 0); |
| 4086 imp->voidMethodNodeArg(nodeArg); | 4084 imp->voidMethodNodeArg(nodeArg); |
| 4087 } | 4085 } |
| 4088 | 4086 |
| 4089 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4087 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4090 { | 4088 { |
| 4091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4089 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4092 if (V8DOMWrapper::isWrapperOfType(info[0], &V8Attr::wrapperTypeInfo)) | |
| 4093 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa
rameter); | |
| 4094 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info); | 4090 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info); |
| 4095 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4091 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4096 } | 4092 } |
| 4097 | 4093 |
| 4098 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4094 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4099 { | 4095 { |
| 4100 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4096 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 4101 v8SetReturnValue(info, imp->arrayBufferMethod()); | 4097 v8SetReturnValue(info, imp->arrayBufferMethod()); |
| 4102 } | 4098 } |
| 4103 | 4099 |
| (...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7024 fromInternalPointer(object)->deref(); | 7020 fromInternalPointer(object)->deref(); |
| 7025 } | 7021 } |
| 7026 | 7022 |
| 7027 template<> | 7023 template<> |
| 7028 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 7024 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 7029 { | 7025 { |
| 7030 return toV8(impl, creationContext, isolate); | 7026 return toV8(impl, creationContext, isolate); |
| 7031 } | 7027 } |
| 7032 | 7028 |
| 7033 } // namespace WebCore | 7029 } // namespace WebCore |
| OLD | NEW |