Closed Bug 1200969 Opened 9 years ago Closed 9 years ago

[Presentation WebAPI] Fix timing issue in PresentationRequestUIGlue

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
FxOS-S6 (04Sep)
Tracking Status
firefox43 --- fixed

People

(Reporter: selin, Assigned: selin)

References

Details

(Whiteboard: [ft:conndevices])

Attachments

(1 file, 1 obsolete file)

PresentationRequestUIGlue sends mozPresentationChromeEvents [1] and uses the session ID as a key to map the promise resolver [2]. Then it listens to mozPresentationContentEvent [3] and uses the session ID to resolve the correspondent promise [4]. However, the chrome event may get sent out earlier before the mapping between session ID and promise resolver is stored (i.e. a time gap between [1] and [2]). And if the corresponding content event happens right in this time gap, then the promise would keep pending since the correspondent resolver couldn't be found [4].

[1] https://dxr.mozilla.org/mozilla-central/source/b2g/components/PresentationRequestUIGlue.js#47
[2] https://dxr.mozilla.org/mozilla-central/source/b2g/components/PresentationRequestUIGlue.js#53
[3] https://dxr.mozilla.org/mozilla-central/source/b2g/components/PresentationRequestUIGlue.js#26
[4] https://dxr.mozilla.org/mozilla-central/source/b2g/components/PresentationRequestUIGlue.js#34-37
Assignee: nobody → selin
Whiteboard: [ft:conndevices]
Attached patch Patch, v1 (obsolete) — Splinter Review
Send the chrome event after the mapping of the resolver is stored.
Attachment #8655859 - Flags: review?(fabrice)
Attachment #8655859 - Flags: review?(fabrice) → review+
Attached patch Patch, v1Splinter Review
Attachment #8655859 - Attachment is obsolete: true
Attachment #8656439 - Flags: review+
Target Milestone: --- → FxOS-S6 (04Sep)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: