Closed Bug 1496745 Opened 2 years ago Closed 2 years ago

Allow GeckoResult to be consumed from threads without a Looper

Categories

(GeckoView :: General, defect, P2)

59 Branch
defect

Tracking

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

RESOLVED FIXED
mozilla64
Tracking Status
geckoview62 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- fixed

People

(Reporter: snorp, Assigned: snorp)

Details

Attachments

(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 jwillcox@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2fee8f9b283d
Allow GeckoResult to be used without a Looper r=agi,jchen
Backed out for bustage on GeckoResult.java:317

backout:

push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=2fee8f9b283dac85340edf7815fd62b93352bd33&group_state=expanded

failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=206129312&repo=autoland&lineNumber=39284

[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/GeckoResult.java:317: 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 https://help.gradle.org
[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 GeckoResult.java:317
> 
> backout: https://hg.mozilla.org/integration/autoland/rev/480c167630359dfb2b683f3f4c876a27a637635e
>
Flags: needinfo?(snorp)
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/740c3623a44a
Allow GeckoResult to be used without a Looper r=agi,jchen
https://hg.mozilla.org/mozilla-central/rev/740c3623a44a
Status: NEW → RESOLVED
Closed: 2 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.