mozilla/addon-sdk — pull request #494 by ochameau (2012-07-16 15:29:53+00:00)
Title: Bug 732716: Wrap into content proxies nodes sent by context-menu to content scripts.

I missed that. Objects sent by context-menu to the content script (for example popup node)
are sent without being proxified. So that the content script have a raw reference to xraywrapper.
That end up messing with proxy code which doesn't expect content script to pass any xray.
Beside that, it is a bad option to give an xray as they have bugs.

I had to remove usages of instanceof as it is broken by Proxies.
(Currently, we can't implement instanceof properly without giving access to underlying object.)
(but hopefully the removal of JS proxies or usage of direct proxies will allow us to implement it correctly)