mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix some warnings caused by the SM upgrade
This commit is contained in:
parent
e7808c526c
commit
b7301ca06c
13 changed files with 16 additions and 19 deletions
|
@ -143,7 +143,7 @@ impl CallbackInterface {
|
|||
/// Wraps the reflector for `p` into the compartment of `cx`.
|
||||
pub fn wrap_call_this_object<T: Reflectable>(cx: *mut JSContext,
|
||||
p: &T,
|
||||
mut rval: MutableHandleObject) {
|
||||
rval: MutableHandleObject) {
|
||||
rval.set(p.reflector().get_jsobject().get());
|
||||
assert!(!rval.get().is_null());
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use dom::bindings::trace::JSTraceable;
|
|||
use js::jsapi::{JSTracer};
|
||||
|
||||
use util::task_state;
|
||||
use util::task_state::{SCRIPT, IN_GC};
|
||||
use util::task_state::SCRIPT;
|
||||
|
||||
use std::cell::{BorrowState, RefCell, Ref, RefMut};
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ use js::jsapi::{JS_ReportErrorNumber1, JSErrorFormatString, JSExnType};
|
|||
use js::jsapi::{JS_SaveFrameChain, JS_RestoreFrameChain};
|
||||
use js::jsapi::JSAutoCompartment;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::JSFalse;
|
||||
|
||||
use libc;
|
||||
use std::ffi::CString;
|
||||
|
|
|
@ -28,7 +28,7 @@ use dom::bindings::trace::trace_reflector;
|
|||
use dom::bindings::utils::{Reflector, Reflectable};
|
||||
use dom::node::Node;
|
||||
use js::jsapi::{JSObject, Heap, JSTracer};
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
use js::jsval::JSVal;
|
||||
use layout_interface::TrustedNodeAddress;
|
||||
use script_task::STACK_ROOTS;
|
||||
|
||||
|
|
|
@ -84,9 +84,9 @@ pub unsafe extern fn delete(cx: *mut JSContext, proxy: HandleObject, id: HandleI
|
|||
}
|
||||
|
||||
/// Stub for ownPropertyKeys
|
||||
pub unsafe extern fn own_property_keys(cx: *mut JSContext,
|
||||
proxy: HandleObject,
|
||||
props: *mut AutoIdVector) -> u8 {
|
||||
pub unsafe extern fn own_property_keys(_cx: *mut JSContext,
|
||||
_proxy: HandleObject,
|
||||
_props: *mut AutoIdVector) -> u8 {
|
||||
// FIXME: implement this
|
||||
// https://github.com/servo/servo/issues/6390
|
||||
JSTrue
|
||||
|
|
|
@ -65,11 +65,11 @@ impl<T: Reflectable> Trusted<T> {
|
|||
/// Create a new `Trusted<T>` instance from an existing DOM pointer. The DOM object will
|
||||
/// be prevented from being GCed for the duration of the resulting `Trusted<T>` object's
|
||||
/// lifetime.
|
||||
pub fn new(cx: *mut JSContext, ptr: &T, script_chan: Box<ScriptChan + Send>) -> Trusted<T> {
|
||||
pub fn new(_cx: *mut JSContext, ptr: &T, script_chan: Box<ScriptChan + Send>) -> Trusted<T> {
|
||||
LIVE_REFERENCES.with(|ref r| {
|
||||
let r = r.borrow();
|
||||
let live_references = r.as_ref().unwrap();
|
||||
let refcount = live_references.addref(cx, &*ptr as *const T);
|
||||
let refcount = live_references.addref(&*ptr as *const T);
|
||||
Trusted {
|
||||
ptr: &*ptr as *const T as *const libc::c_void,
|
||||
refcount: refcount,
|
||||
|
@ -144,7 +144,7 @@ impl LiveDOMReferences {
|
|||
});
|
||||
}
|
||||
|
||||
fn addref<T: Reflectable>(&self, cx: *mut JSContext, ptr: *const T) -> Arc<Mutex<usize>> {
|
||||
fn addref<T: Reflectable>(&self, ptr: *const T) -> Arc<Mutex<usize>> {
|
||||
let mut table = self.table.borrow_mut();
|
||||
match table.entry(ptr as *const libc::c_void) {
|
||||
Occupied(mut entry) => {
|
||||
|
@ -161,7 +161,7 @@ impl LiveDOMReferences {
|
|||
}
|
||||
|
||||
/// Unpin the given DOM object if its refcount is 0.
|
||||
pub fn cleanup(cx: *mut JSContext, raw_reflectable: TrustedReference) {
|
||||
pub fn cleanup(raw_reflectable: TrustedReference) {
|
||||
let TrustedReference(raw_reflectable) = raw_reflectable;
|
||||
LIVE_REFERENCES.with(|ref r| {
|
||||
let r = r.borrow();
|
||||
|
|
|
@ -633,7 +633,7 @@ pub unsafe fn trace_global(tracer: *mut JSTracer, obj: *mut JSObject) {
|
|||
}
|
||||
|
||||
unsafe extern fn wrap(cx: *mut JSContext,
|
||||
existing: HandleObject,
|
||||
_existing: HandleObject,
|
||||
obj: HandleObject)
|
||||
-> *mut JSObject {
|
||||
// FIXME terrible idea. need security wrappers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue