Closed Bug 717069 Opened 8 years ago Closed 8 years ago

Update/correct sessionstore-windows-restored usage in TelemetryPing.js

Categories

(Toolkit :: Telemetry, defect)

x86
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: taras.mozilla, Assigned: froydnj)

References

Details

Attachments

(1 file, 1 obsolete file)

The listener should be unregistered after first callback(it can be called multiple times). We should also include more histograms in copying into STARTUP_* ones. All of the disk cache ones, http calls.

Should also add a startupslowsql category to slow sql stuff.
Filed bug 720456 for the startup information, so this is strictly about unregistering the listener.
Attached patch patch (obsolete) — Splinter Review
Tests don't seem to work with the new boolean flags and I thought they'd be good in any event.
Attachment #603395 - Flags: review?(taras.mozilla)
(In reply to Nathan Froyd (:froydnj) from comment #2)
> Tests don't seem to work with the new boolean flags and I thought they'd be
> good in any event.

"Tests don't seem to work *without* the new..."
Status: NEW → ASSIGNED
Whiteboard: [autoland-try:-b do -p all -u all -t none]
Whiteboard: [autoland-try:-b do -p all -u all -t none] → [autoland-in-queue]
Autoland Patchset:
	Patches: 603395
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=062e73660cd2
Try run started, revision 062e73660cd2. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=062e73660cd2
Comment on attachment 603395 [details] [diff] [review]
patch


>+  _watchingWindowsRestored: false,
>+  _seenWindowsRestored: false,

I see no benefit to these. Is there a downside to removing a non-existent observer?
Attachment #603395 - Flags: review?(taras.mozilla) → review-
(In reply to Taras Glek (:taras) from comment #5)
> I see no benefit to these. Is there a downside to removing a non-existent
> observer?

Yes:

TEST-UNEXPECTED-FAIL | xpcshell/head.js | [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///home/froydnj/src/build-m-c/dist/bin/components/TelemetryPing.js :: <TOP_LEVEL> :: line 677"  data: no]
(In reply to Nathan Froyd (:froydnj) from comment #6)
> (In reply to Taras Glek (:taras) from comment #5)
> > I see no benefit to these. Is there a downside to removing a non-existent
> > observer?
> 
> Yes:
> 
> TEST-UNEXPECTED-FAIL | xpcshell/head.js | [Exception... "Component returned
> failure code: 0x80004005 (NS_ERROR_FAILURE)
> [nsIObserverService.removeObserver]"  nsresult: "0x80004005
> (NS_ERROR_FAILURE)"  location: "JS frame ::
> file:///home/froydnj/src/build-m-c/dist/bin/components/TelemetryPing.js ::
> <TOP_LEVEL> :: line 677"  data: no]

Can we just use an exception handler instead?
(In reply to Taras Glek (:taras) from comment #7)
> Can we just use an exception handler instead?

We could.  That just seems like avoiding the issue, though.
(In reply to Nathan Froyd (:froydnj) from comment #8)
> (In reply to Taras Glek (:taras) from comment #7)
> > Can we just use an exception handler instead?
> 
> We could.  That just seems like avoiding the issue, though.

Yes, avoiding carrying pointless state :)
Try run for 062e73660cd2 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=062e73660cd2
Results (out of 203 total builds):
    exception: 3
    success: 162
    warnings: 36
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-062e73660cd2
 Timed out after 06 hours without completing.
Whiteboard: [autoland-in-queue]
Attached patch patchSplinter Review
Here's a patch which attacks the problem a different way: we use a different topic for tests to be able to gather startup information.  We only try/catch the removal in uninstall(), since I suppose it's possible we can get to uninstall without ever having seen sessionstore-windows-restored.
Attachment #603395 - Attachment is obsolete: true
Attachment #603702 - Flags: review?(taras.mozilla)
Attachment #603702 - Flags: review?(taras.mozilla) → review+
Whiteboard: [autoland-try:-b do -p all -u all -t none]
Whiteboard: [autoland-try:-b do -p all -u all -t none] → [autoland-in-queue]
Autoland Patchset:
	Patches: 603702
	Branch: mozilla-central => try
	Destination: http://hg.mozilla.org/try/pushloghtml?changeset=c8cb37776a06
Try run started, revision c8cb37776a06. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=c8cb37776a06
Try run for c8cb37776a06 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=c8cb37776a06
Results (out of 216 total builds):
    exception: 1
    success: 176
    warnings: 37
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-c8cb37776a06
Whiteboard: [autoland-in-queue]
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ed5fc7a71781
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Depends on: 741255
You need to log in before you can comment on or make changes to this bug.