| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 namespace WebCore { | 70 namespace WebCore { |
| 71 const WrapperTypeInfo V8SVGTestInterface::wrapperTypeInfo = { gin::kEmbedderBlin
k, V8SVGTestInterface::domTemplate, V8SVGTestInterface::derefObject, 0, 0, 0, V8
SVGTestInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype
, false }; | 71 const WrapperTypeInfo V8SVGTestInterface::wrapperTypeInfo = { gin::kEmbedderBlin
k, V8SVGTestInterface::domTemplate, V8SVGTestInterface::derefObject, 0, 0, 0, V8
SVGTestInterface::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype
, false }; |
| 72 | 72 |
| 73 namespace SVGTestInterfaceV8Internal { | 73 namespace SVGTestInterfaceV8Internal { |
| 74 | 74 |
| 75 template <typename T> void V8_USE(T) { } | 75 template <typename T> void V8_USE(T) { } |
| 76 | 76 |
| 77 static void typeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 77 static void typeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 78 { | 78 { |
| 79 SVGTestInterface* imp = V8SVGTestInterface::toNative(info.Holder()); | 79 SVGTestInterface* impl = V8SVGTestInterface::toNative(info.Holder()); |
| 80 v8SetReturnValueString(info, imp->fastGetAttribute(SVGNames::typeAttr), info
.GetIsolate()); | 80 v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), inf
o.GetIsolate()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 83 static void typeAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
| 84 { | 84 { |
| 85 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 85 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 86 SVGTestInterfaceV8Internal::typeAttributeGetter(info); | 86 SVGTestInterfaceV8Internal::typeAttributeGetter(info); |
| 87 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 87 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 88 } | 88 } |
| 89 | 89 |
| 90 static void typeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property
CallbackInfo<void>& info) | 90 static void typeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Property
CallbackInfo<void>& info) |
| 91 { | 91 { |
| 92 SVGTestInterface* imp = V8SVGTestInterface::toNative(info.Holder()); | 92 SVGTestInterface* impl = V8SVGTestInterface::toNative(info.Holder()); |
| 93 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 93 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
| 94 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 94 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 95 imp->setAttribute(SVGNames::typeAttr, cppValue); | 95 impl->setAttribute(SVGNames::typeAttr, cppValue); |
| 96 } | 96 } |
| 97 | 97 |
| 98 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 98 static void typeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
ue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 99 { | 99 { |
| 100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 101 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 101 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
| 102 SVGTestInterfaceV8Internal::typeAttributeSetter(jsValue, info); | 102 SVGTestInterfaceV8Internal::typeAttributeSetter(jsValue, info); |
| 103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 104 } | 104 } |
| 105 | 105 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 fromInternalPointer(object)->deref(); | 180 fromInternalPointer(object)->deref(); |
| 181 } | 181 } |
| 182 | 182 |
| 183 template<> | 183 template<> |
| 184 v8::Handle<v8::Value> toV8NoInline(SVGTestInterface* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 184 v8::Handle<v8::Value> toV8NoInline(SVGTestInterface* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 185 { | 185 { |
| 186 return toV8(impl, creationContext, isolate); | 186 return toV8(impl, creationContext, isolate); |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace WebCore | 189 } // namespace WebCore |
| OLD | NEW |