Closed Bug 1759201 Opened 4 years ago Closed 4 years ago

Add a mozilla::TextRecognition component

Categories

(Core :: DOM: Core & HTML, task, P2)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: gregtatum, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 3 obsolete files)

As part of the exploration work, this a prototype for calling out to OS-level text recognition APIs.

Depends on: 1759204

Let's not call it nsTextRecognition? Just mozilla::TextRecognition unless there's a good reason for the ns prefix? :)

I'm happy to rename it, as I was just cargo culting from the surrounding code.

Summary: Add a nsTextRecognition component → Add a mozilla::TextRecognition component
Assignee: gtatum → emilio
Blocks: 1759504

Comment on attachment 9267442 [details]
WIP: Bug 1759201 - Add a nsTextRecognition component

Revision D140874 was moved to bug 1759504. Setting attachment 9267442 [details] to obsolete.

Attachment #9267442 - Attachment is obsolete: true

Comment on attachment 9267443 [details]
WIP: Bug 1759201 - Prototype a menu button click demo for text recognition

Revision D140875 was moved to bug 1759504. Setting attachment 9267443 [details] to obsolete.

Attachment #9267443 - Attachment is obsolete: true

This adds just the boilerplate, and doesn't implement the OS-specific
bits. It's still useful tho.

Co-Authored-By: Greg Tatum <tatum.creative@gmail.com>

This adds just the boilerplate, and doesn't implement the OS-specific
bits. It's still useful tho.

Co-Authored-By: Greg Tatum <tatum.creative@gmail.com>

Attachment #9267658 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a9c9bf312a6f Add a text recognition component. r=dminor,gregtatum

Backed out for causing xpcshell failures on test_ext_contexts_gc.js

[task 2022-03-14T22:59:38.900Z] 22:59:38     INFO -  TEST-START | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js
[task 2022-03-14T23:04:38.989Z] 23:04:38  WARNING -  TEST-UNEXPECTED-TIMEOUT | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js | Test timed out
[task 2022-03-14T23:04:38.989Z] 23:04:38     INFO -  TEST-INFO took 300089ms
[task 2022-03-14T23:04:38.989Z] 23:04:38     INFO -  >>>>>>>
[task 2022-03-14T23:04:38.990Z] 23:04:38     INFO -  PID 2888 | [Parent 2888, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp:2967
[task 2022-03-14T23:04:38.990Z] 23:04:38     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2022-03-14T23:04:38.990Z] 23:04:38     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2022-03-14T23:04:38.990Z] 23:04:38     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2022-03-14T23:04:38.990Z] 23:04:38     INFO -  running event loop
[task 2022-03-14T23:04:38.991Z] 23:04:38     INFO -  xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js | Starting check_remote
[task 2022-03-14T23:04:38.991Z] 23:04:38     INFO -  (xpcshell/head.js) | test check_remote pending (2)
[task 2022-03-14T23:04:38.991Z] 23:04:38     INFO -  TEST-PASS | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_contexts_gc.js | check_remote - [check_remote : 1] useRemoteWebExtensions matches - true == true
Flags: needinfo?(emilio)
Attachment #9267657 - Attachment description: Bug 1759201 - Add a text recognition component. r=dminor → Bug 1759201 - Add a text recognition component. r=dminor,gregtatum

test_ext_contexts_gc.js calls Assert.ok(context, "..."). That in turn
computes the assert message (even if the assert fails), by calling
JSON.stringify(context).

The context object here is really complex and serialization depends on
the component order because it holds a Cu.Sandbox object among other
stuff. If enumerating a member throws, then we don't get to enumerate
other potentially problematic stuff.

But changing the order of enumeration made it so that we enumerated
nsFocusManager.activeWindow before throwing, which asserts in debug
builds getting my previous patch backed out. Amazing.

Depends on D140975

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9781eea5bfd4 Add a text recognition component. r=dminor,gregtatum https://hg.mozilla.org/integration/autoland/rev/9174271de7dd Fix a webext xpcshell test to not stringify really complex objects. r=extension-reviewers,zombie
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Blocks: 1759204
No longer depends on: 1759204
Blocks: 1782574
No longer blocks: 1759199
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: