Closed Bug 1500456 Opened 6 years ago Closed 6 years ago

Document (and enforce) thread assumptions for public API

Categories

(GeckoView :: General, enhancement, P1)

59 Branch
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: snorp, Assigned: agi)

References

(Blocks 1 open bug)

Details

(Whiteboard: meta)

I think we do have some `ThreadUtils.assertOnUiThread` sprinkled around, but we also need to make sure something makes it into the Javadoc too. Android has @UiThread and similar, but I think all that does is add (pretty useless) static checking[0]. I think we could annotate things with @UiThread or @AnyThread, but back that up with assertions. Then add some stuff to our Javadoc (custom doclet?) that makes sure that gets exposed in the documentation. [0] http://mcomella.xyz/blog/2016/thread-annotations.html
This bug will be a meta bug. We need to audit the APIs for thread callers, annotate the API docs, and then adding thread assertions.
Assignee: nobody → agi
Priority: -- → P1
Whiteboard: meta
Depends on: 1502115
Depends on: 1502118
Depends on: 1502120
Depends on: 1506267
Everything here landed \o/
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Firefox for Android → GeckoView
Version: Firefox 59 → 59 Branch
You need to log in before you can comment on or make changes to this bug.