| 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); |
| 1047 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info); | 1049 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info); |
| 1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1050 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 1049 } | 1051 } |
| 1050 | 1052 |
| 1051 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 1053 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
| 1052 { | 1054 { |
| 1053 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 1055 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 1054 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp); | 1056 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp); |
| 1055 } | 1057 } |
| 1056 | 1058 |
| (...skipping 2990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4047 return; | 4049 return; |
| 4048 } | 4050 } |
| 4049 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4051 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 4050 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::hasInstance(info[0], info.GetIsolate
(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cas
t(info[0])) : 0); | 4052 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::hasInstance(info[0], info.GetIsolate
(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cas
t(info[0])) : 0); |
| 4051 imp->voidMethodNodeArg(nodeArg); | 4053 imp->voidMethodNodeArg(nodeArg); |
| 4052 } | 4054 } |
| 4053 | 4055 |
| 4054 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4056 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 4055 { | 4057 { |
| 4056 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 4059 if (V8DOMWrapper::isWrapperOfType(info[0], &V8Attr::wrapperTypeInfo)) |
| 4060 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa
rameter); |
| 4057 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info); | 4061 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info); |
| 4058 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 4062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 4059 } | 4063 } |
| 4060 | 4064 |
| 4061 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4065 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 4062 { | 4066 { |
| 4063 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4067 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 4064 v8SetReturnValue(info, imp->arrayBufferMethod()); | 4068 v8SetReturnValue(info, imp->arrayBufferMethod()); |
| 4065 } | 4069 } |
| 4066 | 4070 |
| (...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6963 fromInternalPointer(object)->deref(); | 6967 fromInternalPointer(object)->deref(); |
| 6964 } | 6968 } |
| 6965 | 6969 |
| 6966 template<> | 6970 template<> |
| 6967 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 6971 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 6968 { | 6972 { |
| 6969 return toV8(impl, creationContext, isolate); | 6973 return toV8(impl, creationContext, isolate); |
| 6970 } | 6974 } |
| 6971 | 6975 |
| 6972 } // namespace WebCore | 6976 } // namespace WebCore |
| OLD | NEW |