Bug 1493225 Comment 44 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Jim Porter (:squib) from comment #43)

> :snorp, smaug suggested I ping you about how to hook up the patch in attachment 9035176 [details] [diff] [review] to GeckoView. I had thought I could call `TabParent::interruptScript()` here:
> 
> > https://searchfox.org/mozilla-central/rev/c21d6620d384dfb13ede6054015da05a6353b899/mobile/android/modules/geckoview/GeckoViewNavigation.jsm#52
> 
> similar to what I do in `toolkit/components/remotebrowserutils/RemoteWebNavigation.js`. However, it doesn't seem to work. I'm still debugging stuff on my end, but is there anything in particular I should know about differences in GeckoView's architecture compared to desktop here?

GeckoView is just using a `<browser>`, which should already be using RemoteWebNavigation.js, so you should only have to add your interruptScript() stuff in the one place. But no, I don't think we're really doing anything special there.

> 
> Just as a quick summary of the patch, on desktop, I start by calling `TabParent::interruptScript()`, which calls `ContentParent::CancelContentJSExecutionIfRunning()`, which calls the `ProcessHangMonitor`, eventually setting a flag on `XPCJSContext` that terminates the content JS so the chrome JS for our back button can run.

That seems like it should work, I guess? Are things getting dropped along the way somewhere?
(In reply to Jim Porter (:squib) from comment #43)

> :snorp, smaug suggested I ping you about how to hook up the patch in attachment 9035176 [details] [diff] [review] to GeckoView. I had thought I could call `TabParent::interruptScript()` here:
> 
> > https://searchfox.org/mozilla-central/rev/c21d6620d384dfb13ede6054015da05a6353b899/mobile/android/modules/geckoview/GeckoViewNavigation.jsm#52
> 
> similar to what I do in `toolkit/components/remotebrowserutils/RemoteWebNavigation.js`. However, it doesn't seem to work. I'm still debugging stuff on my end, but is there anything in particular I should know about differences in GeckoView's architecture compared to desktop here?

GeckoView is just using a `<browser>`, which should already be using RemoteWebNavigation.js, so you should only have to add your `interruptScript()` stuff in the one place. But no, I don't think we're really doing anything special there.

> 
> Just as a quick summary of the patch, on desktop, I start by calling `TabParent::interruptScript()`, which calls `ContentParent::CancelContentJSExecutionIfRunning()`, which calls the `ProcessHangMonitor`, eventually setting a flag on `XPCJSContext` that terminates the content JS so the chrome JS for our back button can run.

That seems like it should work, I guess? Are things getting dropped along the way somewhere?

Back to Bug 1493225 Comment 44