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

Redefining global.onmessage is breaking Firefox 49 #58

Open
haakonjack opened this issue Oct 6, 2016 · 3 comments
Open

Redefining global.onmessage is breaking Firefox 49 #58

haakonjack opened this issue Oct 6, 2016 · 3 comments

Comments

@haakonjack
Copy link

Firefox logs show:

Message: TypeError: can't define property "onmessage": Object is not extensible
  Stack:
    canUsePostMessage

Removing the setImmediate lib resolves the issue.

@domenic
Copy link
Collaborator

domenic commented Oct 6, 2016

Sounds like a Firefox bug; have you tried filing it there?

@FlyingDR
Copy link

FlyingDR commented Dec 7, 2016

@domenic This issue is reproducible (at least) in a case if code is running as Firefox's SDK-based addon content script. In this case global argument is not a Window, but self object that is, in its turn, naturally not extensible. Not sure about WebExtensions addons since I don't have any at this moment.

Test can be fixed by adding one more condition && !(global.port && global.port.emit) here. However there is one more place where you're modifying global so this is also need to be changed (most likely object choosing here). However I abstain from proposing changes in this area since I may not know about some implementation details.

Hope this information will help to resolve this issue since it currently breaks my addon too :)

FlyingDR added a commit to FlyingDR/setImmediate that referenced this issue Dec 8, 2016
…to script

 - Updated postMessage test to avoid false positive inside Firefox Add-on SDK based extensions
Should fix YuzuJS#58
@FlyingDR
Copy link

FlyingDR commented Oct 8, 2017

Issue is probably not actual anymore, at least into add-on environment since Firefox is moving to WebExtensions that have no such problem

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

3 participants