diff options
author | Moonchild <moonchild@palemoon.org> | 2021-11-01 14:48:34 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-02 14:49:45 +0200 |
commit | 534de5cc5b76f3f8556b8a5c318cde7a5bb93c3d (patch) | |
tree | 1d0cebb83ce88607d10f7543e9defeeb715d1ccc /js/xpconnect | |
parent | 023a71c6f2007eb08116ce539920f7cd11d52d8d (diff) | |
download | uxp-534de5cc5b76f3f8556b8a5c318cde7a5bb93c3d.tar.gz |
Issue #21 - Remove remaining telemetry structs, callers and flags.
Diffstat (limited to 'js/xpconnect')
-rw-r--r-- | js/xpconnect/idl/xpccomponents.idl | 3 | ||||
-rw-r--r-- | js/xpconnect/src/XPCComponents.cpp | 23 | ||||
-rw-r--r-- | js/xpconnect/src/XPCShellImpl.cpp | 6 | ||||
-rw-r--r-- | js/xpconnect/src/XPCWrappedNativeJSOps.cpp | 6 |
4 files changed, 3 insertions, 35 deletions
diff --git a/js/xpconnect/idl/xpccomponents.idl b/js/xpconnect/idl/xpccomponents.idl index 611091c4bd..f2668ce6c2 100644 --- a/js/xpconnect/idl/xpccomponents.idl +++ b/js/xpconnect/idl/xpccomponents.idl @@ -616,9 +616,6 @@ interface nsIXPCComponents_Utils : nsISupports */ PRTime getWatchdogTimestamp(in AString aCategory); - [implicit_jscontext] - jsval getJSEngineTelemetryValue(); - /* * Clone an object into a scope. * The 3rd argument is an optional options object: diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 6d0bbcfcb5..594753d64f 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -3193,29 +3193,6 @@ nsXPCComponents_Utils::GetWatchdogTimestamp(const nsAString& aCategory, PRTime* return NS_OK; } -NS_IMETHODIMP -nsXPCComponents_Utils::GetJSEngineTelemetryValue(JSContext* cx, MutableHandleValue rval) -{ - RootedObject obj(cx, JS_NewPlainObject(cx)); - if (!obj) - return NS_ERROR_OUT_OF_MEMORY; - - unsigned attrs = JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT; - - size_t i = JS_SetProtoCalled(cx); - RootedValue v(cx, DoubleValue(i)); - if (!JS_DefineProperty(cx, obj, "setProto", v, attrs)) - return NS_ERROR_OUT_OF_MEMORY; - - i = JS_GetCustomIteratorCount(cx); - v.setDouble(i); - if (!JS_DefineProperty(cx, obj, "customIter", v, attrs)) - return NS_ERROR_OUT_OF_MEMORY; - - rval.setObject(*obj); - return NS_OK; -} - bool xpc::CloneInto(JSContext* aCx, HandleValue aValue, HandleValue aScope, HandleValue aOptions, MutableHandleValue aCloned) diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp index e4e0db96f2..6c5fa30877 100644 --- a/js/xpconnect/src/XPCShellImpl.cpp +++ b/js/xpconnect/src/XPCShellImpl.cpp @@ -1229,11 +1229,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp) mozilla::LogModule::Init(); - // A initializer to initialize histogram collection - // used by telemetry. - UniquePtr<base::StatisticsRecorder> telStats = - MakeUnique<base::StatisticsRecorder>(); - if (PR_GetEnv("MOZ_CHAOSMODE")) { ChaosFeature feature = ChaosFeature::Any; long featureInt = strtol(PR_GetEnv("MOZ_CHAOSMODE"), nullptr, 16); @@ -1528,7 +1523,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp) bogus = nullptr; #endif - telStats = nullptr; appDir = nullptr; appFile = nullptr; dirprovider.ClearGREDirs(); diff --git a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp index 487ff55d70..6c343e1e8f 100644 --- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp +++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp @@ -937,9 +937,9 @@ const js::ObjectOps XPC_WN_ObjectOpsWithEnumerate = { // |this| object for a given method (often to the detriment of proper // call/apply). When these tricks were removed, a fair amount of chrome // code broke, because it was relying on being able to grab methods off -// some XPCOM object (like the nsITelemetry service) and invoke them without -// a proper |this|. So, if it's quite clear that we're in this situation and -// about to use a |this| argument that just won't work, fix things up. +// some XPCOM object and invoke them without a proper |this|. So, if it's +// quite clear that we're in this situation and about to use a |this| +// argument that just won't work, fix things up. // // This hack is only useful for getters/setters if someone sets an XPCOM object // as the prototype for a vanilla JS object and expects the XPCOM attributes to |