Closed Bug 1496745 Opened 4 years ago Closed 4 years ago

Allow GeckoResult to be consumed from threads without a Looper


(GeckoView :: General, defect, P2)

59 Branch


(geckoview62 wontfix, firefox62 wontfix, firefox63 wontfix, firefox64 fixed)

Tracking Status
geckoview62 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- fixed


(Reporter: snorp, Assigned: snorp)



(1 file)

This is somewhat related to bug 1474618 but comes out at it from a different angle. Right now you need to have a Looper on the thread where a GeckoResult is created. That means you generally cannot call methods that return a GeckoResult without having a Looper in the calling thread. That's inconvenient for some uses of GeckoResult.
If no Looper is present, GeckoResult will schedule listeners to be
executed on a background thread. This also introduces a new poll()
method for synchronously waiting on a value.
Assignee: nobody → snorp
Priority: -- → P2
63=wontfix because we don't need to uplift
Pushed by
Allow GeckoResult to be used without a Looper r=agi,jchen
Backed out for bustage on


push with failures:

failure log:

[task 2018-10-17T15:50:17.309Z] 15:50:17     INFO -  Annotation processing complete in 559ms
[task 2018-10-17T15:50:17.329Z] 15:50:17     INFO -  :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseConsumerProguardFiles
[task 2018-10-17T15:50:17.329Z] 15:50:17     INFO -  :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseShaders
[task 2018-10-17T15:50:17.330Z] 15:50:17     INFO -  :geckoview:compileOfficialWithGeckoBinariesNoMinApiReleaseShaders
[task 2018-10-17T15:50:17.431Z] 15:50:17     INFO -  :geckoview:syncAssetsFromDistDirForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:17.441Z] 15:50:17     INFO -  :geckoview:syncLibsFromDistDirForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:17.472Z] 15:50:17     INFO -  :geckoview:syncOmnijarFromDistDirForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:17.472Z] 15:50:17     INFO -  :geckoview:generateOfficialWithGeckoBinariesNoMinApiReleaseAssets
[task 2018-10-17T15:50:17.583Z] 15:50:17     INFO -  :geckoview:packageOfficialWithGeckoBinariesNoMinApiReleaseAssets
[task 2018-10-17T15:50:17.583Z] 15:50:17     INFO -  :geckoview:packageOfficialWithGeckoBinariesNoMinApiReleaseRenderscript NO-SOURCE
[task 2018-10-17T15:50:17.634Z] 15:50:17     INFO -  :geckoview:transformResourcesWithMergeJavaResForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:17.806Z] 15:50:17     INFO -  :geckoview:transformClassesAndResourcesWithSyncLibJarsForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:17.806Z] 15:50:17     INFO -  :geckoview:compileOfficialWithGeckoBinariesNoMinApiReleaseNdk NO-SOURCE
[task 2018-10-17T15:50:17.826Z] 15:50:17     INFO -  :geckoview:mergeOfficialWithGeckoBinariesNoMinApiReleaseJniLibFolders
[task 2018-10-17T15:50:17.837Z] 15:50:17     INFO -  :geckoview:transformNativeLibsWithMergeJniLibsForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:17.847Z] 15:50:17     INFO -  :geckoview:transformNativeLibsWithSyncJniLibsForOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:19.173Z] 15:50:19     INFO -  :geckoview:bundleOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:19.518Z] 15:50:19     INFO -  :geckoview:javadocOfficialWithGeckoBinariesNoMinApiReleasePicked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf-8
[task 2018-10-17T15:50:19.873Z] 15:50:19     INFO -  /builds/worker/workspace/build/src/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/ error: lambda expressions are not supported in -source 1.7
[task 2018-10-17T15:50:19.873Z] 15:50:19     INFO -          then(() -> {
[task 2018-10-17T15:50:19.874Z] 15:50:19     INFO -                  ^
[task 2018-10-17T15:50:19.874Z] 15:50:19     INFO -    (use -source 8 or higher to enable lambda expressions)
[task 2018-10-17T15:50:19.944Z] 15:50:19     INFO -  1 error
[task 2018-10-17T15:50:19.964Z] 15:50:19     INFO -  :geckoview:javadocOfficialWithGeckoBinariesNoMinApiRelease FAILED
[task 2018-10-17T15:50:20.126Z] 15:50:20     INFO -  :geckoview:sourcesJarOfficialWithGeckoBinariesNoMinApiRelease
[task 2018-10-17T15:50:20.137Z] 15:50:20     INFO -  FAILURE: Build failed with an exception.
[task 2018-10-17T15:50:20.137Z] 15:50:20     INFO -  * What went wrong:
[task 2018-10-17T15:50:20.137Z] 15:50:20     INFO -  Execution failed for task ':geckoview:javadocOfficialWithGeckoBinariesNoMinApiRelease'.
[task 2018-10-17T15:50:20.137Z] 15:50:20     INFO -  > Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/tmp/javadocOfficialWithGeckoBinariesNoMinApiRelease/javadoc.options'
[task 2018-10-17T15:50:20.137Z] 15:50:20     INFO -  * Try:
[task 2018-10-17T15:50:20.138Z] 15:50:20     INFO -  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[task 2018-10-17T15:50:20.138Z] 15:50:20     INFO -  * Get more help at
[task 2018-10-17T15:50:20.138Z] 15:50:20     INFO -  BUILD FAILED in 1m 8s
Flags: needinfo?(snorp)
(In reply to Natalia Csoregi [:nataliaCs] from comment #4)
> Backed out for bustage on
> backout:
Flags: needinfo?(snorp)
Pushed by
Allow GeckoResult to be used without a Looper r=agi,jchen
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Product: Firefox for Android → GeckoView
Version: Firefox 59 → 59 Branch
Target Milestone: Firefox 64 → mozilla64
You need to log in before you can comment on or make changes to this bug.