Skip to content

Commit

Permalink
Bug 1295980 - Telemetry about the use of SharedWorkers, r=smaug
Browse files Browse the repository at this point in the history
  • Loading branch information
bakulf committed Aug 18, 2016
1 parent 2c52d6e commit 38c3766
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dom/workers/SharedWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/dom/MessagePort.h"
#include "mozilla/dom/SharedWorkerBinding.h"
#include "mozilla/Telemetry.h"
#include "nsContentUtils.h"
#include "nsIClassInfoImpl.h"
#include "nsIDOMEvent.h"
Expand Down Expand Up @@ -72,6 +73,8 @@ SharedWorker::Constructor(const GlobalObject& aGlobal, JSContext* aCx,
return nullptr;
}

Telemetry::Accumulate(Telemetry::SHARED_WORKER_COUNT, 1);

return sharedWorker.forget();
}

Expand Down
7 changes: 7 additions & 0 deletions toolkit/components/telemetry/Histograms.json
Original file line number Diff line number Diff line change
Expand Up @@ -9862,6 +9862,13 @@
"description": "When restoring tabs on startup, reading from sessionstore.js failed, even though the file exists and is not containing an explicitly empty window.",
"cpp_guard": "ANDROID"
},
"SHARED_WORKER_COUNT": {
"alert_emails": ["[email protected]"],
"expires_in_version": "58",
"kind": "count",
"bug_numbers": [1295980],
"description": "Number of the use of SharedWorkers."
},
"FENNEC_SESSIONSTORE_RESTORING_FROM_BACKUP": {
"alert_emails": ["[email protected]"],
"expires_in_version": "56",
Expand Down

0 comments on commit 38c3766

Please sign in to comment.