Closed Bug 707285 Opened 13 years ago Closed 13 years ago

Race condition in viewport update causes 1x1 viewport

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kats, Assigned: kats)

Details

Attachments

(1 file)

Race condition under the following circumstances:

1. about:home loads
2. you load another page
3. the surface size change event gets sent from the LayerRenderer to the LayerView to the LayerController (which updates the viewport) to the GeckoSoftwareLayerClient, which calls render(). The render() call gets queued because of the throttling.
4. Meanwhile the page underneath finishes loading and fires a DOMContentLoaded event.
5. This triggers the JS code to send a viewport update back to Java (with it's 1x1 last-known viewport size)
6. The JS viewport update clobbers the LayerController's viewport, and sets the viewport size to 1x1
7. The previously throttled Java-initiated viewport change gets sent, but with the new 1x1 viewport size.

This chain of events effectively discards the surface size changed event, and ends up with a 1x1 viewport.

Patch forthcoming.
Comment on attachment 578682 [details] [diff] [review]
Disallow js from setting java viewport size

Review of attachment 578682 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #578682 - Flags: review?(pwalton) → review+
https://hg.mozilla.org/projects/birch/rev/e0d050bbd783
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: