Closed Bug 2018833 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 58005 - Revert "Blink>AI: guard LanguageDetector detect after destroy"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox150 fixed)

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 58005 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/58005
Details from upstream follow.

Isaac Ahouma <iahouma@google.com> wrote:

Revert "Blink>AI: guard LanguageDetector detect after destroy"

This reverts commit 95ab917064ea02eea493bcc04ca8336c5687d107.

Reason for revert: As per https://crbug.com/483762287#comment7, the original behavior was intended and there was no bug requiring the change.

Original change's description:

Blink>AI: guard LanguageDetector detect after destroy

Ensure detect() checks session destruction before abort handling
so it throws InvalidStateError instead of dereferencing a null
model. Export LanguageDetector for unit tests and add the
language_detection core dep to link tests. Add a unit test that
exercises detect() after destroy().

Bug: 483762287
Change-Id: I223abc975bb90cba2cf3e1bd86ef52224a617e06
Tests: blink_unittests --gtest_filter=LanguageDetectorTest.DetectAfterDestroyThrows
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7570308
Commit-Queue: Reilly Grant \<reillyg@chromium.org>
Commit-Queue: Sophie Chang \<sophiechang@chromium.org>
Reviewed-by: Sophie Chang \<sophiechang@chromium.org>
Reviewed-by: Reilly Grant \<reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584876}

Bug: 483762287
Change-Id: I811ff93360e3efd053d93bdbbc81627285f66e5e

Reviewed-on: https://chromium-review.googlesource.com/7601532
WPT-Export-Revision: 4f74fdc28da398fb0099fa8b6ef8d736d03e4f9f

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 16 subtests

Status Summary

Firefox

PASS : 1
FAIL : 14
TIMEOUT: 1
ERROR : 1

Chrome

TIMEOUT: 2
NOTRUN : 15

Safari

PASS : 1
FAIL : 14
TIMEOUT: 1
ERROR : 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /ai/language_detection/detector.https.window.html [wpt.fyi]: ERROR (Chrome: TIMEOUT, Safari: ERROR)
    • Create requires sticky user activation when availability is "downloadable": FAIL (Chrome: TIMEOUT, Safari: FAIL)
    • LanguageDetector.detect() returns valid results: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • If monitor throws an error, LanguageDetector.create() rejects with that error: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.create() call with an aborted signal.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Aborting createLanguageDetector().: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Calling LanguageDetector.destroy() aborts calls to detect and measureInputUsage.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.create()'s abort signal destroys its LanguageDetector after creation.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.detect() call with an aborted signal.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Aborting LanguageDetector.detect().: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.measureInputUsage() and inputQuota basic usage.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • LanguageDetector.measureInputUsage() call with an aborted signal.: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Aborting LanguageDetector.measureInputUsage().: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Creating LanguageDetector with empty expectedInputLanguages array: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Creating LanguageDetector without expectedInputLanguages: FAIL (Chrome: NOTRUN, Safari: FAIL)
    • Progress events are not emitted after aborted.: TIMEOUT (Chrome: NOTRUN, Safari: TIMEOUT)
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ea641769df20 https://hg.mozilla.org/integration/autoland/rev/f13c292ebbf8 [wpt PR 58005] - Revert "Blink>AI: guard LanguageDetector detect after destroy", a=testonly
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
You need to log in before you can comment on or make changes to this bug.