Re: [dev-servo] DOM object unwrapping without QueryInterface

2013-08-30 Thread Boris Zbarsky
On 8/30/13 11:55 PM, Josh Matthews wrote: The current DOM bindings can only fallibly unwrap object types that have complete WebIDL prototype chains (ie. we can grab the interface ID array from the object and compare the slot in the chain we care about with the one we're trying to unwrap). This ca

Re: [dev-servo] DOM object unwrapping without QueryInterface

2013-08-30 Thread Brendan Eich
QI is just a clunky, '90s version of dynamic_cast with RTTI (even now, RTTI costs too much for us to turn on, at least on some platforms). What's the rustic way to reflect on types at runtime to do something akin to dynamic_cast? /be Josh Matthews August 30, 2

[dev-servo] DOM object unwrapping without QueryInterface

2013-08-30 Thread Josh Matthews
The current DOM bindings can only fallibly unwrap object types that have complete WebIDL prototype chains (ie. we can grab the interface ID array from the object and compare the slot in the chain we care about with the one we're trying to unwrap). This causes a problem for things like WindowPro