Code generation uses DOMString::from("...") rather than DOMString("...".to_owned()).

This commit is contained in:
Alan Jeffrey 2015-11-11 16:53:44 -06:00
parent 84bde75b42
commit 034769f280

View file

@ -825,7 +825,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
default = "None"
else:
assert defaultValue.type.tag() == IDLType.Tags.domstring
default = 'DOMString("%s".to_owned())' % defaultValue.value
default = 'DOMString::from("%s")' % defaultValue.value
if type.nullable():
default = "Some(%s)" % default