-
Notifications
You must be signed in to change notification settings - Fork 19
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
Function.prototype.constructor is tamed in the host #52
Comments
Also have this problem when developing WebExtension-shim |
I am not sure I understand which realm's |
When you creating a new realm, the outside world (out of the sandbox)'s Function is polluted. And code relay on that can not work properly |
Ok, that is definitely a bug. Will investigate. Thanks all!!! |
A fix is available at 969f1fe |
Line 130 in 067bdd9
Turns out, that breaks |
Before shutting down or transferring the realms shim, in addition to applying relevant improvements to the compartments shim (see endojs/endo#481) we should also migrate relevant outstanding open PRs and issues, such as this one. |
We recently ran into a problem with the Realm shim. We're injecting the shim into our page via
<script src="...">
and then using theRealm
object. However, that causesFunction
to be tamed in the host page, which we weren't expecting to happen.Recently we upgraded selenium-webdriver, one of our 3rd-party dependencies, that apparently now calls
Function("...")
to eval something. When the Realm shim is loaded, that no longer works. We end up gettingTypeError: Not available
when we call their driver.executeScript API call.Is there a reason to tame
Function
in the host environment? We think we can work around it on our end by loading the Realm shim into a same-origin iframe instead, but I wanted to file this issue with you in case this behavior was unintended. I imagine this behavior will also trip up others trying to use the shim in the future.The text was updated successfully, but these errors were encountered: