mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use DOMString::new() somewhat consistently.
This commit is contained in:
parent
dab3926622
commit
e6aa976462
24 changed files with 67 additions and 68 deletions
|
@ -56,7 +56,6 @@ use js::rust::{ToInt64, ToUint64};
|
|||
use libc;
|
||||
use num::Float;
|
||||
use num::traits::{Bounded, Zero};
|
||||
use std::borrow::ToOwned;
|
||||
use std::rc::Rc;
|
||||
use std::{char, ptr, slice};
|
||||
use util::str::DOMString;
|
||||
|
@ -517,7 +516,7 @@ impl FromJSValConvertible for DOMString {
|
|||
-> Result<DOMString, ()> {
|
||||
if null_behavior == StringificationBehavior::Empty &&
|
||||
value.get().is_null() {
|
||||
Ok("".to_owned())
|
||||
Ok(DOMString::new())
|
||||
} else {
|
||||
let jsstr = unsafe { ToString(cx, value) };
|
||||
if jsstr.is_null() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue