mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
clean up lints and tidy errors
This commit is contained in:
parent
3e5d725be5
commit
65da7b668b
2 changed files with 4 additions and 10 deletions
|
@ -39,7 +39,6 @@ use js::jsapi::{DOMProxyShadowsResult, JSContext, JSObject, PropertyDescriptor};
|
||||||
use js::jsapi::{GetWellKnownSymbol, SymbolCode};
|
use js::jsapi::{GetWellKnownSymbol, SymbolCode};
|
||||||
use js::jsapi::{JSErrNum, SetDOMProxyInformation};
|
use js::jsapi::{JSErrNum, SetDOMProxyInformation};
|
||||||
use js::jsid::SymbolId;
|
use js::jsid::SymbolId;
|
||||||
use js::jsval::JSVal;
|
|
||||||
use js::jsval::ObjectValue;
|
use js::jsval::ObjectValue;
|
||||||
use js::jsval::UndefinedValue;
|
use js::jsval::UndefinedValue;
|
||||||
use js::rust::wrappers::JS_AlreadyHasOwnPropertyById;
|
use js::rust::wrappers::JS_AlreadyHasOwnPropertyById;
|
||||||
|
@ -194,7 +193,7 @@ pub unsafe fn ensure_expando_object(
|
||||||
/// Set the property descriptor's object to `obj` and set it to enumerable,
|
/// Set the property descriptor's object to `obj` and set it to enumerable,
|
||||||
/// and writable if `readonly` is true.
|
/// and writable if `readonly` is true.
|
||||||
pub fn set_property_descriptor(
|
pub fn set_property_descriptor(
|
||||||
mut desc: MutableHandle<PropertyDescriptor>,
|
desc: MutableHandle<PropertyDescriptor>,
|
||||||
value: HandleValue,
|
value: HandleValue,
|
||||||
attrs: u32,
|
attrs: u32,
|
||||||
is_none: &mut bool,
|
is_none: &mut bool,
|
||||||
|
|
|
@ -11,13 +11,8 @@ use crate::dom::window::Window;
|
||||||
use crate::js::conversions::ToJSValConvertible;
|
use crate::js::conversions::ToJSValConvertible;
|
||||||
use crate::script_runtime::JSContext as SafeJSContext;
|
use crate::script_runtime::JSContext as SafeJSContext;
|
||||||
use js::conversions::jsstr_to_string;
|
use js::conversions::jsstr_to_string;
|
||||||
use js::glue::{
|
use js::glue::{AppendToIdVector, CreateProxyHandler, NewProxyObject, ProxyTraps};
|
||||||
AppendToIdVector, CreateProxyHandler, NewProxyObject, ProxyTraps, RUST_SYMBOL_TO_JSID,
|
use js::jsapi::{GetWellKnownSymbol, JS_SetImmutablePrototype, SymbolCode};
|
||||||
};
|
|
||||||
use js::jsapi::{
|
|
||||||
jsid, GetPropertyKeys, GetWellKnownSymbol, JS_SetImmutablePrototype, SymbolCode, JSITER_HIDDEN,
|
|
||||||
JSITER_OWNONLY, JSITER_SYMBOLS,
|
|
||||||
};
|
|
||||||
use js::jsapi::{
|
use js::jsapi::{
|
||||||
Handle, HandleObject, JSClass, JSContext, JSErrNum, MutableHandleObject, UndefinedHandleValue,
|
Handle, HandleObject, JSClass, JSContext, JSErrNum, MutableHandleObject, UndefinedHandleValue,
|
||||||
};
|
};
|
||||||
|
@ -124,7 +119,7 @@ unsafe extern "C" fn get_own_property_descriptor(
|
||||||
// If the property key is an integer index, convert it to a String too.
|
// If the property key is an integer index, convert it to a String too.
|
||||||
// TODO(delan) will this interfere with indexed access on the Window object
|
// TODO(delan) will this interfere with indexed access on the Window object
|
||||||
// (window[index]), which should only return document-tree child navigables?
|
// (window[index]), which should only return document-tree child navigables?
|
||||||
// https://html.spec.whatwg.org/#accessing-other-browsing-contexts
|
// https://html.spec.whatwg.org/multipage/#accessing-other-browsing-contexts
|
||||||
id.to_int().to_string()
|
id.to_int().to_string()
|
||||||
} else if id.is_symbol() {
|
} else if id.is_symbol() {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue