Bug 1210240 - Do some telemetry for potential subject-principal crash sites. r=gfritzsche,r=vladan

This commit is contained in:
Bobby Holley 2015-09-30 17:07:12 -07:00
parent 31832aa6be
commit eb0165db4f
2 changed files with 7 additions and 0 deletions

View File

@ -2710,6 +2710,7 @@ nsContentUtils::SubjectPrincipal()
MOZ_ASSERT(NS_IsMainThread());
JSContext* cx = GetCurrentJSContext();
if (!cx) {
Telemetry::Accumulate(Telemetry::SUBJECT_PRINCIPAL_ACCESSED_WITHOUT_SCRIPT_ON_STACK, true);
return GetSystemPrincipal();
}

View File

@ -5314,6 +5314,12 @@
"kind": "flag",
"description": "Whether enablePrivilege has ever been called during the current session"
},
"SUBJECT_PRINCIPAL_ACCESSED_WITHOUT_SCRIPT_ON_STACK": {
"expires_in_version": "46",
"alert_emails": ["bholley@mozilla.com"],
"kind": "flag",
"description": "Whether the subject principal was accessed without script on the stack during the current session"
},
"TOUCH_ENABLED_DEVICE": {
"expires_in_version": "never",
"kind": "boolean",