The default bug view has changed. See this FAQ.

frameworker json.parse occasional errors

VERIFIED FIXED in Firefox 17

Status

()

Firefox
SocialAPI
VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

Tracking

unspecified
Firefox 19
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox17+ verified, firefox18+ verified)

Details

(Whiteboard: [Fx17])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 672057 [details] [diff] [review]
parsefix.patch

I've been seeing occasional failures with json.parse in the frameworker ClientPort class, and couldn't figure out a repro for it.  Then with reload, Pam started running into it and had to work around it.  I finally chased it down to pending messages on the ports.  

fw_AbstractPort_onmessage first parses the json it receives, then if there is no handler it sticks that object in pending messages

When the port connects, it grabs the pending messages and calls fw_AbstractPort_onmessage again, but passing an object rather than a string.

with reload, content area's are more likely to create pending messages while the frameworker is reloading, thus easier to reproduce, and more likely to be a problem.

The attachement looks like the correct fix to me, but the port stuff is pretty involved, will ask Mark to look.
Attachment #672057 - Flags: feedback?(mhammond)
Comment on attachment 672057 [details] [diff] [review]
parsefix.patch

I agree that looks correct but think we need a test :)

So IIUC, to see this you will need to have a port which is connected but which has not yet set an onmessage handler when a message arrives?  Our tests probably don't do that, but it shouldn't be too hard to arrange in browser_frameworker?
Attachment #672057 - Flags: feedback?(mhammond) → feedback+
(Assignee)

Comment 2

5 years ago
Created attachment 672100 [details] [diff] [review]
parsefix.patch

https://tbpl.mozilla.org/?tree=Try&rev=3e86045e2829
Attachment #672057 - Attachment is obsolete: true
Attachment #672100 - Flags: review?(gavin.sharp)
Comment on attachment 672100 [details] [diff] [review]
parsefix.patch

good catch
Attachment #672100 - Flags: review?(gavin.sharp) → review+
Comment on attachment 672100 [details] [diff] [review]
parsefix.patch

[Triage Comment]
a+ for 17/18 given that it's a social-specific, simple fix
Attachment #672100 - Flags: approval-mozilla-beta+
Attachment #672100 - Flags: approval-mozilla-aurora+
Assignee: nobody → mixedpuppy
status-firefox17: --- → affected
status-firefox18: --- → affected
tracking-firefox17: --- → +
tracking-firefox18: --- → +
OS: Mac OS X → All
Hardware: x86 → All
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/77deb50b07e1
Keywords: checkin-needed
Target Milestone: --- → Firefox 19
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/77deb50b07e1
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Please land to branches by EOD Pacific time on Monday so we're sure to get this into 17.0 Beta 3

Comment 8

5 years ago
Beta 3 and Aurora missed despite the approval!
(In reply to Scoobidiver from comment #8)
> Beta 3 and Aurora missed despite the approval!

It's ok - I checked with gavin in irc ahead of time, we can take this in Beta 4 - please land this asap though, since it does have approval.
https://hg.mozilla.org/releases/mozilla-aurora/rev/1e19bb30061f
https://hg.mozilla.org/releases/mozilla-beta/rev/7ca7a0794864
status-firefox17: affected → fixed
status-firefox18: affected → fixed
Marking verified fixed since this landed with tests. Please add verifyme keyword if there's something you need QA to test.
Status: RESOLVED → VERIFIED
status-firefox17: fixed → verified
status-firefox18: fixed → verified
You need to log in before you can comment on or make changes to this bug.