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

Unified Diff: Source/bindings/tests/results/modules/UnionTypesModules.cpp

Issue 937773002: IDL: Support default values for dictionary members of union types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/modules/UnionTypesModules.cpp
diff --git a/Source/bindings/tests/results/modules/UnionTypesModules.cpp b/Source/bindings/tests/results/modules/UnionTypesModules.cpp
index bd60b7378d1f5e25e54cc75229e48e3382ea2535..6438e18dd44c7c5b7e81fde3f33ddab95f11f56b 100644
--- a/Source/bindings/tests/results/modules/UnionTypesModules.cpp
+++ b/Source/bindings/tests/results/modules/UnionTypesModules.cpp
@@ -28,6 +28,13 @@ void BooleanOrString::setBoolean(bool value)
m_type = SpecificTypeBoolean;
}
+BooleanOrString BooleanOrString::fromBoolean(bool value)
+{
+ BooleanOrString container;
+ container.setBoolean(value);
+ return container;
+}
+
String BooleanOrString::getAsString() const
{
ASSERT(isString());
@@ -41,6 +48,13 @@ void BooleanOrString::setString(String value)
m_type = SpecificTypeString;
}
+BooleanOrString BooleanOrString::fromString(String value)
+{
+ BooleanOrString container;
+ container.setString(value);
+ return container;
+}
+
void V8BooleanOrString::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, BooleanOrString& impl, ExceptionState& exceptionState)
{
if (v8Value.IsEmpty())

Powered by Google App Engine
This is Rietveld 408576698