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: https://tbpl.mozilla.org/?tree=Try&rev=30b08591d306
Looks green - pushed to m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/3cbfbd2dad36