Closed Bug 1566947 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 17890 - Attach BarcodeDetectionProviderPtr to an ExecutionContext supplement

Categories

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

task

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Reilly Grant <reillyg@chromium.org> wrote:

Attach BarcodeDetectionProviderPtr to an ExecutionContext supplement

This change creates a new class, BarcodeDetectorStatics, which owns the
connection to BarcodeDetectionProvider. This allows it to implement the
static methods on BarcodeDetector such as getSupportedFormats() without
needing to create an instance of BarcodeDetector.

This fixes an issue where getSupportedFormats() would reject when
BarcodeDetection is unimplemented even if a successful connection to
BarcodeDetectionProvider is made. It also avoids recreating the
provider connection for every new BarcodeDetector.

Bug: 983910
Change-Id: I7c7ea7df84f68bbed9b2bfc600852e4f4e5356cc

Reviewed-on: https://chromium-review.googlesource.com/1706893
WPT-Export-Revision: 63a641388169d8870b679f78b357cec3361c7ba4

Type: -- → task
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.