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

fix IE11 Script Access Denied error. #165

Closed

Conversation

doctyper
Copy link

This pull request fixes an issue that surfaced when we used core-js on a page containing iframes in IE11. Attempting to access properties on the iframe threw Script Access Denied errors.


// @@toStringTag case
if (TAG in O && typeof O[TAG] === 'string') {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix here was to add the TAG in O check.

@zloirock
Copy link
Owner

Thanks for the PR! Can you show a reproducible example for clarifying the problem? Some fallbacks for IE11 Script Access Denied already added.

@zloirock
Copy link
Owner

zloirock commented Feb 3, 2016

@doctyper so what about a reproducible example?

@doctyper
Copy link
Author

doctyper commented Feb 3, 2016

@zloirock It's very difficult to abstract this into a reproducible example.

We use a React stack using Babel to transpile our code. Babel uses core-js to shim functionality, and that's where the bug surfaces for us.

I've tried to reproduce the error using just core-js but the fact that the bug only occurs on IE11/IE Edge makes this a very tedious process.

I do believe this is in some way similar to the fallbacks you added (I used them to track down this bug as well).

@zloirock
Copy link
Owner

zloirock commented Feb 6, 2016

The main problem here - ({get [Symbol.toStringTag](){ throw 42 }}) + '' should throw error by the spec, but with try / catch it will not work. And performance issue (it's also used for classification objects in some cases). I also can't reproduce it. Need to think what we can do.

@zloirock zloirock closed this in fb3ff34 Mar 8, 2016
@zloirock
Copy link
Owner

zloirock commented Mar 8, 2016

Still can't reproduce it, but OK, added this fallback.

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

Successfully merging this pull request may close these issues.

2 participants