diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-13 07:17:30 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-13 07:17:30 +0530 |
commit | 62acdd303b78951885c2c90747b31f318907d6c9 (patch) | |
tree | b0023f9bef56e99485f78004e727f19cbe520d16 /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | e63b1e83d4acd272cdf293292f2a496455405098 (diff) | |
parent | 0da1623788022d82d045e215e48ba0c07798a787 (diff) | |
download | servo-62acdd303b78951885c2c90747b31f318907d6c9.tar.gz servo-62acdd303b78951885c2c90747b31f318907d6c9.zip |
Auto merge of #8477 - asajeffrey:opaque-domstring, r=asajeffrey
Opaque DOMString
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).
The changes are:
* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.
This enables experimenting with other string representations in the DOM.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8477)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index aef047285ed..70f883a5eb5 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -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 |