Open
Bug 1499547
Opened 6 years ago
Updated 2 years ago
Consider removing DOMRequest
Categories
(Core :: DOM: Core & HTML, task, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: mccr8, Unassigned)
References
(Blocks 4 open bugs)
Details
(4 keywords)
Maybe this is completely hopeless, but DOMRequest is the cause of one of the failures in WPT tests that we fail and all other browsers pass (dom/historical.html) so I figured we should at least have a bug on file for the removal, even if just to WONTFIX it with some kind of justification for it.
(I looked through the summary of every bug with DOMRequest in the name and didn't see that any had ever been filed about removing it.)
Comment 1•6 years ago
|
||
The only places DOMRequest is used are:
1) BrowserElement.webidl. We could switch this to Promise, I bet.
2) As an interface IDBFileRequest, which is used in IDBFileHandle, inherits from.
Looks like that's some sort of Gecko-only stuff?
3) IDBMutableFile directly.
I wonder whether the IDBMutableFile/FileRequest/FileHandle stuff is actually used...
Flags: needinfo?(bugmail)
Comment 2•6 years ago
|
||
Looks like we have telemetry for createMutableFile and mozCreateFileHandle on IDBDatabase, which are the relevant entry points. Use counter for createMutableFile at https://telemetry.mozilla.org/new-pipeline/dist.html#!cumulative=0&end_date=2018-08-30&include_spill=0&keys=__none__!__none__!__none__&max_channel_version=beta%252F62&measure=USE_COUNTER2_IDBDATABASE_CREATEMUTABLEFILE_PAGE&min_channel_version=null&processType=content&product=Firefox&sanitize=1&sort_keys=submissions&start_date=2018-06-25&table=0&trim=1&use_submission_date=0> says there are no uses at all: 0 sample sum out of 8.78e9 samples.
The use counter for mozCreateFileHandle seems to not exist at all, suggesting that we were never hitting that codepath.
This is sounding like stuff we might be able to just remove...
Comment 3•6 years ago
|
||
The mutable file handle stuff is all b2g-era stuff exposed by IndexedDB and the dead DeviceStorage API (https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/API/Device_Storage_API) that we probably should indeed remove. :janv, do you concur?
In terms of consumers, the Mozilla dweb project at https://github.com/mozilla/libdweb seems to be trying to bring back many of the b2g APIs that were removed/disabled so that they can be exposed to WebExtensions. In particular, https://github.com/Gozala/random-access-idb-mutable-file/ builds on top of IDBMutableFile. Note that I don't think that's a reason to keep the API around in IndexedDB. IndexedDB's clever refcounted blob storage seems like a sufficient abstraction layer for higher level storage stuff to build on.
Flags: needinfo?(bugmail) → needinfo?(jvarga)
Comment 4•6 years ago
|
||
Yeah, the counters were added in bug 1271457. There are no uses, so I think it's time to remove it.
I filed bug 1500343 for that.
Flags: needinfo?(jvarga)
Reporter | ||
Updated•6 years ago
|
Keywords: dev-doc-needed
Updated•6 years ago
|
Keywords: site-compat
Updated•6 years ago
|
Priority: -- → P5
Comment 5•6 years ago
|
||
OK, so the BrowserElement API... Is it used at all? Could we just remove it?
Comment 6•6 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #5)
> OK, so the BrowserElement API... Is it used at all? Could we just remove it?
IIRC it's used by the devtools team for the responsive design view and that's why we've had to keep it around. (I'd love if someone could convince them to switch to <xul:browser> but perhaps in the last year or two other consumers have crept in.)
Perhaps it would be nice to find a way to prevent new consumers from using the API at least. :-)
Comment 7•6 years ago
|
||
> IIRC it's used by the devtools team for the responsive design view
Well, <iframe mozbrowser> is used. But is the actual script API used? Initial searchfoxing on some of the methods was only turning up test uses.
I guess I should try disabling the direct API tests, adding some MOZ_CRASH and doing a trypush...
Comment 8•6 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #7)
> > IIRC it's used by the devtools team for the responsive design view
>
> Well, <iframe mozbrowser> is used. But is the actual script API used?
> Initial searchfoxing on some of the methods was only turning up test uses.
Removing the ones that aren't used above would be super nice!
Updated•6 years ago
|
Blocks: proprietary-dom
Updated•6 years ago
|
Keywords: parity-chrome,
parity-safari
Updated•5 years ago
|
Type: enhancement → task
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•