| 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 3103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3114 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3114 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 3115 { | 3115 { |
| 3116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3117 TestObjectV8Internal::locationAttributeGetter(info); | 3117 TestObjectV8Internal::locationAttributeGetter(info); |
| 3118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3119 } | 3119 } |
| 3120 | 3120 |
| 3121 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 3121 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) |
| 3122 { | 3122 { |
| 3123 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); | 3123 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); |
| 3124 TestNode* imp = WTF::getPtr(proxyImp->location()); | 3124 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->location()); |
| 3125 if (!imp) | 3125 if (!imp) |
| 3126 return; | 3126 return; |
| 3127 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3127 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
| 3128 imp->setHref(cppValue); | 3128 imp->setHref(cppValue); |
| 3129 } | 3129 } |
| 3130 | 3130 |
| 3131 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3131 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 3132 { | 3132 { |
| 3133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3133 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3134 TestObjectV8Internal::locationAttributeSetter(jsValue, info); | 3134 TestObjectV8Internal::locationAttributeSetter(jsValue, info); |
| 3135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3135 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3136 } | 3136 } |
| 3137 | 3137 |
| 3138 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 3138 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 3139 { | 3139 { |
| 3140 TestObject* imp = V8TestObject::toNative(info.Holder()); | 3140 TestObject* imp = V8TestObject::toNative(info.Holder()); |
| 3141 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithException()), imp); | 3141 v8SetReturnValueFast(info, WTF::getPtr(imp->locationWithException()), imp); |
| 3142 } | 3142 } |
| 3143 | 3143 |
| 3144 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3144 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3145 { | 3145 { |
| 3146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3147 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3147 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
| 3148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3149 } | 3149 } |
| 3150 | 3150 |
| 3151 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 3151 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
| 3152 { | 3152 { |
| 3153 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); | 3153 TestObject* proxyImp = V8TestObject::toNative(info.Holder()); |
| 3154 TestNode* imp = WTF::getPtr(proxyImp->locationWithException()); | 3154 RefPtr<TestNode> imp = WTF::getPtr(proxyImp->locationWithException()); |
| 3155 if (!imp) | 3155 if (!imp) |
| 3156 return; | 3156 return; |
| 3157 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3157 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
| 3158 imp->setHrefThrows(cppValue); | 3158 imp->setHrefThrows(cppValue); |
| 3159 } | 3159 } |
| 3160 | 3160 |
| 3161 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3161 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 3162 { | 3162 { |
| 3163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 3164 TestObjectV8Internal::locationWithExceptionAttributeSetter(jsValue, info); | 3164 TestObjectV8Internal::locationWithExceptionAttributeSetter(jsValue, info); |
| (...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5630 fromInternalPointer(object)->deref(); | 5630 fromInternalPointer(object)->deref(); |
| 5631 } | 5631 } |
| 5632 | 5632 |
| 5633 template<> | 5633 template<> |
| 5634 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 5634 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
| 5635 { | 5635 { |
| 5636 return toV8(impl, creationContext, isolate); | 5636 return toV8(impl, creationContext, isolate); |
| 5637 } | 5637 } |
| 5638 | 5638 |
| 5639 } // namespace WebCore | 5639 } // namespace WebCore |
| OLD | NEW |