Closed Bug 911364 Opened 8 years ago Closed 8 years ago

New GeckoView instances aren't connected to Gecko when Activity is recreated

Categories

(Core Graveyard :: Embedding: GRE Core, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: mfinkle, Assigned: bnicholson)

References

Details

Attachments

(1 file)

Using a test app built with GeckoView:
1. Load web content into test app
2. Rotate device
3. GeckoView goes "white"
4. Attempt to reload content into GeckoView

It fails to load anything.
Maybe caused by 891634?
Maybe caused by bug 891634?
Rotating recreates the Activity and the GeckoView, so we need to hook the new GeckoView up to Gecko. This now draws the page after rotation, but there's several question/issues that still need to be sorted out:

1) With this patch, I've noticed that after rotating/zooming, touch events are misaligned with where I'm actually touching on the screen.
2) We call GeckoAppShell.registerEventListener() with 'this' as the listener, so the destroyed GeckoView is leaked whenever we rotate. We'll need to figure out a way to unregister these listeners (onDetachedFromWindow?) or decouple them from GeckoView.
3) What happens when we receive events from Gecko while there is no view available (e.g., we're in the middle of a rotation, or we're in the background with "Don't Keep Activities" enabled)? With the current implementation, it's possible that the GeckoView client misses something like Gecko:Ready, and the application becomes borked.
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Attachment #827586 - Flags: review?(blassey.bugs)
Summary: Rotating app causes GeckoView to lose it's connection to Gecko → New GeckoView instances aren't connected to Gecko when Activity is recreated
Attachment #827586 - Flags: review?(blassey.bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/b2e51c4467a4
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.