Add JSCLASS_DOM_GLOBAL to DOM global classes, and assert it is used.

It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
This commit is contained in:
Ms2ger 2014-05-03 10:37:46 +02:00
parent a6f235e285
commit 599d76fa6e
2 changed files with 5 additions and 7 deletions

View file

@ -207,7 +207,7 @@ pub struct DOMJSClass {
pub fn GetProtoOrIfaceArray(global: *JSObject) -> **JSObject {
unsafe {
/*assert ((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0;*/
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
JS_GetReservedSlot(global, DOM_PROTOTYPE_SLOT).to_private() as **JSObject
}
}