Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fx22+] Implicit use of window methods throws "Illegal operation on WrappedNative prototype object" #89

Closed
ghost opened this issue Apr 2, 2013 · 2 comments
Milestone

Comments

@ghost
Copy link

ghost commented Apr 2, 2013

window.getComputedStyle(document.body); // works
getComputedStyle(document.body); // throws exception

window.btoa("Test"); // works
btoa("Test"); // throws exception

Strangely enough, window.alert("Test") and alert("Test") both work.

Tested with:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130402 Firefox/22.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130402 Firefox/23.0
Scriptish 0.1.8

Greasemonkey 1.8 is not affected.

@ghost
Copy link
Author

ghost commented Apr 9, 2013

Looks like sandbox.__proto__ = safeWin; doesn't do anything anymore. Uncommenting the following line seems to fix it but I don't know enough about XPCOM or the inner workings of Scriptish to judge what the implications might be.

https://github.com/scriptish/scriptish/blob/master/extension/modules/utils/Scriptish_injectScripts.js#L53

@ghost
Copy link
Author

ghost commented Apr 14, 2013

@erikvold @supahgreg @nmaier
Anyone?

@nmaier nmaier closed this as completed in c10f6f1 May 31, 2013
samatjain added a commit to samatjain/web-userscripts that referenced this issue Apr 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants