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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceNode.cpp

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 10 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: Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp b/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
index 7dda941231798ef260bcce413005fc4e9b6ed18e..a388763ffd565c896d79700a50651b69711e61d3 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
@@ -52,7 +52,9 @@ static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
{
v8::Local<v8::Object> holder = info.Holder();
TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
- TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
impl->setStringAttribute(cppValue);
}
@@ -152,7 +154,9 @@ static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
{
v8::Local<v8::Object> holder = info.Holder();
Element* impl = V8Element::toImpl(holder);
- TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
}
@@ -182,7 +186,9 @@ static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
{
v8::Local<v8::Object> holder = info.Holder();
Element* impl = V8Element::toImpl(holder);
- TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
+ V8StringResource<> cppValue = v8Value;
+ if (!cppValue.prepare())
+ return;
impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
}

Powered by Google App Engine
This is Rietveld 408576698