Ignore uses of IDBFactory.open(name) in telemetry
Categories
(Core :: Storage: IndexedDB, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
References
Details
Attachments
(1 file)
As pointed out in https://bugzilla.mozilla.org/show_bug.cgi?id=1566758#c25:
This means that we need to change the webidl (https://searchfox.org/mozilla-central/source/dom/webidl/IDBFactory.webidl#36) such that the parameter is made non-optional, and we add another overload that only accepts the first parameter, so that we can properly distinguish these cases in the code.
| Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
Unfortunately, the webidl syntax does not seem to allow this. Trying the declare IDBOpenDBRequest open(DOMString name, IDBOpenDBOptions options) yields the following error:
WebIDL.WebIDLError: error: Dictionary argument without any required fields or union argument containing such dictionary not followed by a required argument must be optional
I don't see a possibility to change this in a way these conditions are fulfilled.
We could, however, change the default value of the dictionary to contain some dummy entry that indicates that the caller did not pass any dictionary.
| Assignee | ||
Comment 2•6 years ago
|
||
This does not seem to be possible either, due to https://heycam.github.io/webidl/#idl-dictionary:
However, there is no way to represent a constant dictionary value inside IDL fragments.
Then the only way is to assume, as ttung already suggested, that explicit calls with an empty dictionary are so rare, that we can ignore them completely for the telemetry.
Or is there any other feasible option?
Comment 3•6 years ago
|
||
(In reply to Simon Giesecke [:sg] [he/him] from comment #2)
This does not seem to be possible either, due to https://heycam.github.io/webidl/#idl-dictionary:
However, there is no way to represent a constant dictionary value inside IDL fragments.
Then the only way is to assume, as ttung already suggested, that explicit calls with an empty dictionary are so rare, that we can ignore them completely for the telemetry.
Or is there any other feasible option?
Not I can think of at this moment.
I guess we can assume the usage of the empty dictionary is really rare since it would throw on other browsers and take no effect on opening a database.
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f1d229db816d
Exclude calls of open(name, {}) and open(name) from telemetry. r=ttung,asuth
Comment 6•6 years ago
|
||
| bugherder | ||
Description
•