Closed Bug 1243069 Opened 4 years ago Closed 4 years ago

Get rid of Gecko:Ready dependency in GeckoThread

Categories

(Core :: Widget: Android, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file)

Right now GeckoThread depends on the Gecko:Ready message sent by browser.js for changing the Gecko thread state to RUNNING. We should get rid of that dependency so we don't rely on having browser.js.
Right now, we rely on browser.js sending Gecko:Ready, to set the
GeckoThread state to RUNNING upon receiving Gecko:Ready. This patch
gets rid of this dependency on browser.js and Gecko:Ready.
Attachment #8712292 - Flags: review?(snorp)
Comment on attachment 8712292 [details] [diff] [review]
Control GeckoThread state entirely from C++ code (v1)

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

::: widget/android/nsAppShell.cpp
@@ +329,5 @@
>              }
>          }
>          removeObserver = true;
>  
> +    } else if (!strcmp(aTopic, "chrome-document-loaded")) {

Cool, I didn't know about this event. Is the subject anything reasonable that we could use to figure out *which* chrome doc loaded?
Attachment #8712292 - Flags: review?(snorp) → review+
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #2)
> Comment on attachment 8712292 [details] [diff] [review]
> Control GeckoThread state entirely from C++ code (v1)
> 
> Review of attachment 8712292 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: widget/android/nsAppShell.cpp
> @@ +329,5 @@
> >              }
> >          }
> >          removeObserver = true;
> >  
> > +    } else if (!strcmp(aTopic, "chrome-document-loaded")) {
> 
> Cool, I didn't know about this event. Is the subject anything reasonable
> that we could use to figure out *which* chrome doc loaded?

I think so. I'm pretty sure we can then get back the nsWindow/GeckoView if needed.
https://hg.mozilla.org/mozilla-central/rev/a628353b83b8
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.