Closed
Bug 1214408
Opened 9 years ago
Closed 9 years ago
[Session Restore] Telemetry on SessionStore:update OOM
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
Firefox 45
People
(Reporter: Yoric, Assigned: Yoric)
References
Details
Attachments
(1 file)
No description provided.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → dteller
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1214408 - Telemetry on SessionStore:update OOM;r?ttaubert
Attachment #8674531 -
Flags: review?(ttaubert)
Updated•9 years ago
|
Attachment #8674531 -
Flags: review?(ttaubert) → review+
Comment 2•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
https://reviewboard.mozilla.org/r/22239/#review19887
r=me with some manual testing that the OOM error is properly recorded.
::: browser/components/sessionstore/SessionStore.jsm:795
(Diff revision 1)
> + SessionStoreInternal.reportInternalError(data);
this.reportInternalError(data);
::: browser/components/sessionstore/content/content-sessionStore.js:717
(Diff revision 1)
> + } catch (ex if
> + (ex == Components.result.NS_ERROR_OUT_OF_MEMORY)
> + ||(ex && typeof ex == "object" && ex.result == Components.result.NS_ERROR_OUT_OF_MEMORY)
That's not super pretty... can exceptions really have those two forms? If we need both then maybe do:
try {
...
} catch (ex if isOOMError(ex)) {
...
}
::: browser/components/sessionstore/content/content-sessionStore.js:724
(Diff revision 1)
> + sendMessage("SessionStore:error"), {
> + telemetry
> + });
This isn't valid syntax, did you run tests and try that this sends errors to the parent as expected?
Assignee | ||
Comment 3•9 years ago
|
||
I admit I've been lazy with this first patch. I'll try and reproduce the OOM in a test, this should help.
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Bug 1214408 - Telemetry on SessionStore:update OOM;r?ttaubert
Assignee | ||
Comment 5•9 years ago
|
||
Review ping?
Comment 6•9 years ago
|
||
Well if you set the r? flag then I'll see it in my dashboard :) Will take a look now.
Comment 7•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
https://reviewboard.mozilla.org/r/22239/#review20989
It's great that you spent the time writing a test (which I think you forgot to 'hg add' btw) but I'm not a fan of such amounts of test functions in production code.
Can we somehow from the outside, maybe from another content script, override sendMessage? Otherwise I would prefer not landing a test (or rather not landing those test functions) and seeing whether the crash numbers drop.
::: browser/components/sessionstore/content/content-sessionStore.js:752
(Diff revisions 1 - 2)
> - } catch (ex if
> + } catch (ex if typeof ex == "object" && ex.result == Components.results.NS_ERROR_OUT_OF_MEMORY) {
Can we do:
} catch (ex if ex && ex.result == Components.results.NS_ERROR_OUT_OF_MEMORY) {
Should work just as fine even if it's not an object.
Attachment #8674531 -
Flags: review+
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Tim Taubert [:ttaubert] from comment #6)
> Well if you set the r? flag then I'll see it in my dashboard :) Will take a
> look now.
Yeah, I hadn't realized that MozReview had turned it into a r+.
Thanks for the review.
Assignee | ||
Updated•9 years ago
|
Attachment #8674531 -
Flags: review?(ttaubert)
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Bug 1214408 - Telemetry on SessionStore:update OOM;r?ttaubert
Assignee | ||
Comment 10•9 years ago
|
||
https://reviewboard.mozilla.org/r/22239/#review20989
> Can we do:
>
> } catch (ex if ex && ex.result == Components.results.NS_ERROR_OUT_OF_MEMORY) {
>
> Should work just as fine even if it's not an object.
Ah, good to know.
Assignee | ||
Comment 11•9 years ago
|
||
Ok, I managed to inject custom `sendSyncMessage`/`sendAsyncMessage` into the frame script. Ugly, but good to know.
Comment 12•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
https://reviewboard.mozilla.org/r/22239/#review21141
::: browser/components/sessionstore/content/content-sessionStore.js:713
(Diff revisions 2 - 3)
> - } catch (ex if typeof ex == "object" && ex.result == Components.results.NS_ERROR_OUT_OF_MEMORY) {
> + } catch (ex if ex.result == Cr.NS_ERROR_OUT_OF_MEMORY) {
This fails if ex==null (which probably can happen?). Should be |ex if ex && ex.result ...|.
Attachment #8674531 -
Flags: review?(ttaubert) → review+
Assignee | ||
Comment 13•9 years ago
|
||
https://reviewboard.mozilla.org/r/22239/#review21141
> This fails if ex==null (which probably can happen?). Should be |ex if ex && ex.result ...|.
The semantics of this `if` are... interesting.
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Attachment #8674531 -
Attachment description: MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r?ttaubert → MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Assignee | ||
Comment 15•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 16•9 years ago
|
||
failed to apply:
patching file toolkit/components/telemetry/Histograms.json
Hunk #1 FAILED at 4301
1 out of 1 hunks FAILED -- saving rejects to file toolkit/components/telemetry/Histograms.json.rej
patch failed to apply
abort: fix up the merge and run hg transplant --continue
Flags: needinfo?(dteller)
Keywords: checkin-needed
Assignee | ||
Comment 17•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Assignee | ||
Comment 18•9 years ago
|
||
Comment on attachment 8674531 [details]
MozReview Request: Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Bug 1214408 - Telemetry on SessionStore:update OOM;r=ttaubert
Comment 20•9 years ago
|
||
Keywords: checkin-needed
Comment 21•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Comment 22•9 years ago
|
||
bugherder uplift |
status-b2g-v2.5:
--- → fixed
Comment 23•9 years ago
|
||
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
You need to log in
before you can comment on or make changes to this bug.
Description
•