mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Don't pass nullable strings to native DOM methods that want non-nullable strings. Fixes #1207.
This commit is contained in:
parent
803cd4b7cf
commit
08afc6d19d
75 changed files with 968 additions and 966 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::CommentBinding;
|
||||
use dom::bindings::utils::{DOMString, Fallible, null_str_as_empty};
|
||||
use dom::bindings::utils::{DOMString, Fallible};
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::node::{AbstractNode, ScriptView, CommentNodeTypeId, Node};
|
||||
|
@ -26,7 +26,7 @@ impl Comment {
|
|||
Node::reflect_node(@mut node, document, CommentBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, data: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Comment::new(null_str_as_empty(data), owner.Document()))
|
||||
pub fn Constructor(owner: @mut Window, data: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Comment::new(data.clone(), owner.Document()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue