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 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2867 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 2867 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
2868 { | 2868 { |
2869 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2869 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2870 TestObjV8Internal::locationAttributeGetter(info); | 2870 TestObjV8Internal::locationAttributeGetter(info); |
2871 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2871 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2872 } | 2872 } |
2873 | 2873 |
2874 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 2874 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
2875 { | 2875 { |
2876 TestObj* proxyImp = V8TestObject::toNative(info.Holder()); | 2876 TestObj* proxyImp = V8TestObject::toNative(info.Holder()); |
2877 TestNode* imp = proxyImp->location(); | 2877 RefPtr<TestNode> imp = proxyImp->location(); |
2878 if (!imp) | 2878 if (!imp) |
2879 return; | 2879 return; |
2880 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2880 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2881 imp->setHref(cppValue); | 2881 imp->setHref(cppValue); |
2882 } | 2882 } |
2883 | 2883 |
2884 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2884 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2885 { | 2885 { |
2886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2887 TestObjV8Internal::locationAttributeSetter(jsValue, info); | 2887 TestObjV8Internal::locationAttributeSetter(jsValue, info); |
2888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2889 } | 2889 } |
2890 | 2890 |
2891 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2891 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2892 { | 2892 { |
2893 TestObj* imp = V8TestObject::toNative(info.Holder()); | 2893 TestObj* imp = V8TestObject::toNative(info.Holder()); |
2894 v8SetReturnValueFast(info, imp->locationWithException(), imp); | 2894 v8SetReturnValueFast(info, imp->locationWithException(), imp); |
2895 } | 2895 } |
2896 | 2896 |
2897 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2897 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2898 { | 2898 { |
2899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2900 TestObjV8Internal::locationWithExceptionAttributeGetter(info); | 2900 TestObjV8Internal::locationWithExceptionAttributeGetter(info); |
2901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 2901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
2902 } | 2902 } |
2903 | 2903 |
2904 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 2904 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
2905 { | 2905 { |
2906 TestObj* proxyImp = V8TestObject::toNative(info.Holder()); | 2906 TestObj* proxyImp = V8TestObject::toNative(info.Holder()); |
2907 TestNode* imp = proxyImp->locationWithException(); | 2907 RefPtr<TestNode> imp = proxyImp->locationWithException(); |
2908 if (!imp) | 2908 if (!imp) |
2909 return; | 2909 return; |
2910 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 2910 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
2911 imp->setHrefThrows(cppValue); | 2911 imp->setHrefThrows(cppValue); |
2912 } | 2912 } |
2913 | 2913 |
2914 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2914 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
2915 { | 2915 { |
2916 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2916 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2917 TestObjV8Internal::locationWithExceptionAttributeSetter(jsValue, info); | 2917 TestObjV8Internal::locationWithExceptionAttributeSetter(jsValue, info); |
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5466 fromInternalPointer(object)->deref(); | 5466 fromInternalPointer(object)->deref(); |
5467 } | 5467 } |
5468 | 5468 |
5469 template<> | 5469 template<> |
5470 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 5470 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
5471 { | 5471 { |
5472 return toV8(impl, creationContext, isolate); | 5472 return toV8(impl, creationContext, isolate); |
5473 } | 5473 } |
5474 | 5474 |
5475 } // namespace WebCore | 5475 } // namespace WebCore |
OLD | NEW |