mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 808457 - Add Telemetry for Components.lookupMethod and Components.interfaces. r=mrbkap
This commit is contained in:
parent
b7a80f0b32
commit
b03878d5cf
@ -4864,6 +4864,12 @@ nsXPCComponents::CanCallMethod(const nsIID * iid, const PRUnichar *methodName, c
|
||||
{
|
||||
static const char* allowed[] = { "isSuccessCode", "lookupMethod", nullptr };
|
||||
*_retval = xpc_CheckAccessList(methodName, allowed);
|
||||
if (*_retval &&
|
||||
methodName[0] == 'l' &&
|
||||
!AccessCheck::callerIsXBL(nsContentUtils::GetCurrentJSContext()))
|
||||
{
|
||||
Telemetry::Accumulate(Telemetry::COMPONENTS_LOOKUPMETHOD_ACCESSED_BY_CONTENT, true);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -4873,6 +4879,12 @@ nsXPCComponents::CanGetProperty(const nsIID * iid, const PRUnichar *propertyName
|
||||
{
|
||||
static const char* allowed[] = { "interfaces", "interfacesByID", "results", nullptr};
|
||||
*_retval = xpc_CheckAccessList(propertyName, allowed);
|
||||
if (*_retval &&
|
||||
propertyName[0] == 'i' &&
|
||||
!AccessCheck::callerIsXBL(nsContentUtils::GetCurrentJSContext()))
|
||||
{
|
||||
Telemetry::Accumulate(Telemetry::COMPONENTS_INTERFACES_ACCESSED_BY_CONTENT, true);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2401,5 +2401,13 @@
|
||||
"COMPONENTS_OBJECT_ACCESSED_BY_CONTENT": {
|
||||
"kind": "flag",
|
||||
"description": "Whether content ever accesed the Components object in this session"
|
||||
},
|
||||
"COMPONENTS_LOOKUPMETHOD_ACCESSED_BY_CONTENT": {
|
||||
"kind": "flag",
|
||||
"description": "Whether content ever accesed Components.lookupMethod in this session"
|
||||
},
|
||||
"COMPONENTS_INTERFACES_ACCESSED_BY_CONTENT": {
|
||||
"kind": "flag",
|
||||
"description": "Whether content ever accesed Components.interfaces in this session"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user