aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-02-20 14:39:11 +0100
committerMs2ger <ms2ger@gmail.com>2015-02-20 14:45:46 +0100
commit21a1143dd155d9fed2a5158e6e50f055365529e3 (patch)
tree1e18c8c8a7324966e97a3a7a9c9806c45c003d7f /components/script
parent03408d69fb167f7ddb8c0ebee3d6345586efba1f (diff)
downloadservo-21a1143dd155d9fed2a5158e6e50f055365529e3.tar.gz
servo-21a1143dd155d9fed2a5158e6e50f055365529e3.zip
Use u32 for reserved slot indices.
This is what the JSAPI expects.
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py2
-rw-r--r--components/script/dom/bindings/conversions.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 1865facf9d5..fd560bb542a 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1855,7 +1855,7 @@ assert!(!obj.is_null());\
create += """\
assert!(!obj.is_null());
-JS_SetReservedSlot(obj, DOM_OBJECT_SLOT as u32,
+JS_SetReservedSlot(obj, DOM_OBJECT_SLOT,
PrivateValue(boxed::into_raw(object) as *const libc::c_void));"""
return create
diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs
index e60584a6416..da44795748c 100644
--- a/components/script/dom/bindings/conversions.rs
+++ b/components/script/dom/bindings/conversions.rs
@@ -410,8 +410,8 @@ pub fn is_dom_proxy(obj: *mut JSObject) -> bool {
/// stored for non-proxy bindings.
// We use slot 0 for holding the raw object. This is safe for both
// globals and non-globals.
-pub const DOM_OBJECT_SLOT: uint = 0;
-const DOM_PROXY_OBJECT_SLOT: uint = js::JSSLOT_PROXY_PRIVATE as uint;
+pub const DOM_OBJECT_SLOT: u32 = 0;
+const DOM_PROXY_OBJECT_SLOT: u32 = js::JSSLOT_PROXY_PRIVATE;
/// Returns the index of the slot wherein a pointer to the reflected DOM object
/// is stored.
@@ -420,10 +420,10 @@ const DOM_PROXY_OBJECT_SLOT: uint = js::JSSLOT_PROXY_PRIVATE as uint;
pub unsafe fn dom_object_slot(obj: *mut JSObject) -> u32 {
let clasp = JS_GetClass(obj);
if is_dom_class(&*clasp) {
- DOM_OBJECT_SLOT as u32
+ DOM_OBJECT_SLOT
} else {
assert!(is_dom_proxy(obj));
- DOM_PROXY_OBJECT_SLOT as u32
+ DOM_PROXY_OBJECT_SLOT
}
}