Closed Bug 1499453 Opened 7 years ago Closed 2 years ago

Use GeckoResult.ALLOW/DENY shortcuts in GeckoView code

Categories

(GeckoView :: General, task, P5)

53 Branch
All
Android
task

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: droeh, Assigned: Gela)

References

Details

(Keywords: good-first-bug)

Attachments

(1 file, 1 obsolete file)

After bug 1495786, a quite common use case is to return GeckoResult.fromValue(AllowOrDeny.ALLOW), and similarly with DENY; it would be convenient to have a shorthand for this in GeckoResult, eg GeckoResult.ALLOW and GeckoResult.DENY
Bug 1495786 already added GeckoResult.ALLOW/DENY :) But in this bug we want to search through existing GeckoView code, replace all instances of "GeckoResult.fromValue(AllowOrDeny.ALLOW)" with "GeckoResult.ALLOW", and replace all instances of "GeckoResult.fromValue(AllowOrDeny.DENY)" with "GeckoResult.DENY".
Depends on: 1495786
Summary: Add GeckoResult.ALLOW/DENY shortcuts → Use GeckoResult.ALLOW/DENY shortcuts in GeckoView code
(In reply to Jim Chen [:jchen] [:darchons] from comment #1) > Bug 1495786 already added GeckoResult.ALLOW/DENY :) Hah, good catch, I forgot I had already written those :)
Product: Firefox for Android → GeckoView
Severity: normal → S3

Enhancements should have severity N/A.

Severity: S3 → N/A
Assignee: nobody → gmalekpour

According to the change log, it looks like GeckoResult.ALLOW and GeckoResult.DENY are deprecated and we should use GeckoResult.allow and GeckoResult.deny instead.

Status: NEW → ASSIGNED
Pushed by gmalekpour@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c3cd9a2f257b Use GeckoResult.ALLOW/DENY shortcuts in GeckoView code r=android-reviewers,kaya

Backed out for causing multiple failures

  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-ERROR | /webdriver/tests/classic/get_title/get.py | test_payload - setup error: webdriver.error.UnknownErrorException: unknown error (500): Could not launch Android org.mozilla.geckoview.test_runner/.App: Resource temporarily unavailable (os error 11)
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.AccessibilityTest#testLiveRegionImage | status -2
    TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.ExtensionActionTest#testOpenPopup[#pageAction] | org.mozilla.geckoview.GeckoResult$UncaughtException: java.lang.StackOverflowError: stack size 8MB
Flags: needinfo?(gmalekpour)

Related Firebase Test Lab crashes prior to backout

04-09 11:20:32.319: E/ExceptionHandler(8383): java.lang.StackOverflowError: stack size 8192KB
04-09 11:20:32.319: E/ExceptionHandler(8383): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:32.319: E/ExceptionHandler(8383): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:32.319: E/ExceptionHandler(8383): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:32.319: E/ExceptionHandler(8383): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:32.319: E/ExceptionHandler(8383): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)

https://console.firebase.google.com/project/moz-focus-android/testlab/histories/bh.2189b040bbce6d5a/matrices/4878594879707240425/details?stepId=bs.9a0a0a6b48be4bd9&testCaseId=1&tabId=logs

04-09 11:20:42.297: I/mozac/CrashReporter(8729): Received crash: UncaughtExceptionCrash(timestamp=1712686842297, throwable=java.lang.StackOverflowError: stack size 8192KB, breadcrumbs=[], uuid=e23f6a18-141b-4622-818f-07504341f0d9)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoResult.allow(GeckoResult.java:275)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at mozilla.components.browser.engine.gecko.GeckoEngineSession$createNavigationDelegate$1.onLoadRequest(GeckoEngineSession.kt:1174)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoSession.lambda$shouldLoadUri$4(GeckoSession.java:2330)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoSession.$r8$lambda$vdirh44YvOSCDWeHCJ6n1mQYHNg(Unknown Source:0)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoSession$$ExternalSyntheticLambda3.run(D8$$SyntheticClass:0)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.gecko.util.ThreadUtils.runOnUiThread(ThreadUtils.java:52)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoSession.shouldLoadUri(GeckoSession.java:2328)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at org.mozilla.geckoview.GeckoSession.load(GeckoSession.java:2260)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at mozilla.components.browser.engine.gecko.GeckoEngineSession.loadUrl(GeckoEngineSession.kt:213)
04-09 11:20:42.297: E/ExceptionHandler(8729): 	at mozilla.components.browser.state.engine.middleware.LinkingMiddleware$performLoadOnMainThread$1.invokeSuspend(LinkingMiddleware.kt:119)

e.g, Logcat

Attachment #9395349 - Attachment is obsolete: true
Flags: needinfo?(gmalekpour)
Attachment #9398253 - Attachment description: WIP: Bug 1499453 - Use GeckoResult.ALLOW/DENY shortcuts in GeckoView code → Bug 1499453 - Use GeckoResult.ALLOW/DENY shortcuts in GeckoView code
Pushed by gmalekpour@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/743a4fab24b8 Use GeckoResult.ALLOW/DENY shortcuts in GeckoView code r=android-reviewers,owlish,tchoh
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: