Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp

Issue 2342053002: binding: Refactors bindings/templates/attributes.cpp. (Closed)
Patch Set: Synced. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
index 3e0faf96311674ad529523663184414d4cd78f1c..9655ab9af62b3aa8cfe916fa3920cb8082e73c0e 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
@@ -53,7 +53,9 @@ namespace SVGTestInterfaceV8Internal {
static void typeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
+
SVGTestInterface* impl = V8SVGTestInterface::toImpl(holder);
+
v8SetReturnValueString(info, impl->fastGetAttribute(SVGNames::typeAttr), info.GetIsolate());
}
@@ -66,17 +68,24 @@ static void typeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Function
{
v8::Local<v8::Object> holder = info.Holder();
SVGTestInterface* impl = V8SVGTestInterface::toImpl(holder);
+
+ // Skip on compact node DOMString getters.
+ V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
+
+ // Prepare the value to be set.
V8StringResource<> cppValue = v8Value;
if (!cppValue.prepare())
return;
- V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
+
impl->setAttribute(SVGNames::typeAttr, cppValue);
}
void typeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
+
V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
+
SVGTestInterfaceV8Internal::typeAttributeSetter(v8Value, info);
}

Powered by Google App Engine
This is Rietveld 408576698