Closed
Bug 1428320
Opened 8 years ago
Closed 8 years ago
Ignore about: pages in storage type telemetry
Categories
(Core :: Storage: IndexedDB, enhancement, P1)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
mozilla60
| Tracking | Status | |
|---|---|---|
| firefox60 | --- | fixed |
People
(Reporter: johannh, Assigned: johannh)
References
Details
(Whiteboard: [storage-v2])
Attachments
(2 files)
In bug 1354500 we considered that the high amount of storage: 'persistent' usage in telemetry (see https://bugzilla.mozilla.org/show_bug.cgi?id=1354500#c4) could be because we also count about:home usage. We should ignore internal about: pages to see if that corrects the number.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jhofmann
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [storage-v2][triage] → [storage-v2]
Comment 3•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8940183 [details]
Bug 1428320 - Ignore about: pages for indexedDB storage type telemetry.
https://reviewboard.mozilla.org/r/210500/#review216148
::: dom/indexedDB/IDBFactory.cpp:459
(Diff revision 1)
> if (!IsChrome() &&
> aOptions.mStorage.WasPassed()) {
> +
> + // Ignore internal usage on about: pages.
> + bool isAbout = false;
> + nsCOMPtr<nsIPrincipal> principal = PrincipalInfoToPrincipal(*mPrincipalInfo);
PrincipalInfoToPrincipal can only be called on the main thread, but the open() method can be run in workers too.
::: dom/indexedDB/IDBFactory.cpp:462
(Diff revision 1)
> + // Ignore internal usage on about: pages.
> + bool isAbout = false;
> + nsCOMPtr<nsIPrincipal> principal = PrincipalInfoToPrincipal(*mPrincipalInfo);
> + nsCOMPtr<nsIURI> uri;
> + if (principal) {
> + principal->GetURI(getter_AddRefs(uri));
Checking just for non null |principal| shoud be ok, but I'm not sure about ignoring nsresult returned by GetURI(). The same applies to the SchemeIs call.
Something like this shoulf be safer:
if (principal) {
nsCOMPtr<nsIURI> uri;
rv = principal->GetURI(getter_AddRefs(uri));
if (NS_SUCCEEDED(rv) && uri) {
bool isAbout;
rv = uri->SchemeIs("about", &isAbout);
if (NS_SUCCEEDED(rv) && isAbout) {
ignore = true;
}
}
}
Attachment #8940183 -
Flags: review?(jvarga) → review-
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8940184 [details]
Bug 1428320 - Extend the indexedDB storage type telemetry to version 62.
https://reviewboard.mozilla.org/r/210502/#review216952
Approving extension of storage type probe.
Attachment #8940184 -
Flags: review?(liuche) → review+
Comment 7•8 years ago
|
||
Updates on this?
| Assignee | ||
Updated•8 years ago
|
Attachment #8940183 -
Flags: review?(jvarga) → review?(bugmail)
Comment 8•8 years ago
|
||
Sorry about the delay, the patch looks good. r=me
| Assignee | ||
Updated•8 years ago
|
Attachment #8940183 -
Flags: review?(bugmail)
| Assignee | ||
Comment 9•8 years ago
|
||
Can you quickly change the flag in mozreview so that I can check this in via autoland (assuming it doesn't have conflicts)?
Thanks! :)
Flags: needinfo?(jvarga)
Comment 10•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8940183 [details]
Bug 1428320 - Ignore about: pages for indexedDB storage type telemetry.
https://reviewboard.mozilla.org/r/210500/#review222732
Attachment #8940183 -
Flags: review+
Updated•8 years ago
|
Flags: needinfo?(jvarga)
Comment 11•8 years ago
|
||
Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a4bd8549207d
Ignore about: pages for indexedDB storage type telemetry. r=janv
https://hg.mozilla.org/integration/autoland/rev/556d77fe66b0
Extend the indexedDB storage type telemetry to version 62. r=liuche
Comment 12•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a4bd8549207d
https://hg.mozilla.org/mozilla-central/rev/556d77fe66b0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•