Open Bug 1293755 Opened 8 years ago Updated 2 years ago

Stop exposing imagelib internals to javascript

Categories

(Core :: Graphics: ImageLib, defect, P3)

defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [gfx-noted])

Doing this makes the internal implementation ugly because of XPCOM and hampers refactoring efforts. The main user of script are tests. I suspect we can probably change these tests (some can perhaps become gtests) and otherwise expose the required functionality in a saner way.

Of these, I'd probably most like for imgIRequest to go away.
Depends on: 1293763
If you can do this without busting add ons, I'm all for it.

The (serious) effects that exposing ImageLib stuff via XPCOM has on the internal design are something I've thought about before. One way of fixing them is to freeze the XPCOM API and turn the implementations into stubs that exist only for add ons. The stubs would reimplement the old API in terms of the new internal API that replaces it.

This would clean things up internally a lot, but it leaves add ons with a bad API, and we'll still have to put engineering effort into maintaining compatibility whenever things change internally, so it's not ideal. It certainly *would* be better just to stop exposing this stuff to JS at all.
Whiteboard: [gfx-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.