Wrappers are parented to their compartment's global, so we need to unwrap if we want to give callers what they expect. Patch coming right up.
Created attachment 606405 [details] [diff] [review]
Components.utils.getGlobalForObject should unwrap cross-compartment wrappers. v1
Attaching a patch. Flagging khuey for review because, well, I've already given a lot to Blake. ;-)
Pushed this to try:
Looks green - pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/3cbfbd2dad36
*** Bug 613315 has been marked as a duplicate of this bug. ***