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 Firefox 32 #69

Merged
merged 1 commit into from
Oct 12, 2014
Merged

Fix Firefox 32 #69

merged 1 commit into from
Oct 12, 2014

Conversation

ahilss
Copy link
Collaborator

@ahilss ahilss commented Oct 12, 2014

Event objects passed into page_worker message handlers now appear to be immutable in FF32. We were mutating the event object by adding a setResponse function and replacing _callback_x strings in the message args with onSuccess and onError handlers. This is why we were seeing exceptions about onError being undefined. Making a deep copy of the message data fixes the issue.

It looks like events passed in contexts other than page_worker are still mutable, but we should still fix them to protect against changes like this in the future. Mutating input parameters is a bad idea, especially when those parameters come from third-party code.

The event object now appears to be immutable in FF32, so mutations to the object were failing.
vijayp added a commit that referenced this pull request Oct 12, 2014
@vijayp vijayp merged commit 0df4b20 into master Oct 12, 2014
@vijayp vijayp deleted the ahilss.fix-firefox32 branch October 12, 2014 07:25
@rnewman
Copy link

rnewman commented Oct 12, 2014

It would be worthwhile testing with Electrolysis enabled in a current Nightly; it'll bump into issues similar to this one.

https://wiki.mozilla.org/Electrolysis
https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox
https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox

@denadai2
Copy link
Contributor

@ahilss I love you

@splnlss
Copy link

splnlss commented Oct 13, 2014

Yeah, thanks a ton for the fix!

On Oct 13, 2014, at 9:53 AM, Marco De Nadai notifications@github.com wrote:

@ahilss I love you


Reply to this email directly or view it on GitHub.

shanewho pushed a commit to shanewho/mitro that referenced this pull request Nov 3, 2014
@DashW
Copy link

DashW commented Feb 17, 2015

Any idea when this fix might make it into a stable release? Especially considering we're up to Firefox 35 now o_0

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.

None yet

8 participants