diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-04 09:41:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-04 09:41:24 +0200 |
commit | 93cae908bcbd063f21d5663a7d3149464af2ad20 (patch) | |
tree | 8809b848f23acede820937356df6083a3f57685c /dom/plugins | |
parent | ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (diff) | |
download | UXP-93cae908bcbd063f21d5663a7d3149464af2ad20.tar UXP-93cae908bcbd063f21d5663a7d3149464af2ad20.tar.gz UXP-93cae908bcbd063f21d5663a7d3149464af2ad20.tar.lz UXP-93cae908bcbd063f21d5663a7d3149464af2ad20.tar.xz UXP-93cae908bcbd063f21d5663a7d3149464af2ad20.zip |
Remove all C++ telemetry autotimers
Diffstat (limited to 'dom/plugins')
-rw-r--r-- | dom/plugins/base/nsPluginHost.cpp | 9 | ||||
-rw-r--r-- | dom/plugins/ipc/PluginAsyncSurrogate.cpp | 2 | ||||
-rw-r--r-- | dom/plugins/ipc/PluginInstanceParent.cpp | 11 | ||||
-rwxr-xr-x | dom/plugins/ipc/PluginModuleParent.cpp | 34 |
4 files changed, 18 insertions, 38 deletions
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 916bdea0f..c3de136d0 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2148,11 +2148,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir, nsPluginInfo info; memset(&info, 0, sizeof(info)); nsresult res; - // Opening a block for the telemetry AutoTimer - { - Telemetry::AutoTimer<Telemetry::PLUGIN_LOAD_METADATA> telemetry; - res = pluginFile.GetPluginInfo(info, &library); - } + res = pluginFile.GetPluginInfo(info, &library); // if we don't have mime type don't proceed, this is not a plugin if (NS_FAILED(res) || !info.fMimeTypeArray) { RefPtr<nsInvalidPluginTag> invalidTag = new nsInvalidPluginTag(filePath.get(), @@ -2410,8 +2406,6 @@ nsPluginHost::FindPluginsInContent(bool aCreatePluginList, bool* aPluginsChanged // This is needed in ReloadPlugins to prevent possible recursive reloads nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChanged) { - Telemetry::AutoTimer<Telemetry::FIND_PLUGINS> telemetry; - NS_ENSURE_ARG_POINTER(aPluginsChanged); *aPluginsChanged = false; @@ -3412,7 +3406,6 @@ nsPluginHost::StopPluginInstance(nsNPAPIPluginInstance* aInstance) return NS_OK; } - Telemetry::AutoTimer<Telemetry::PLUGIN_SHUTDOWN_MS> timer; aInstance->Stop(); // if the instance does not want to be 'cached' just remove it diff --git a/dom/plugins/ipc/PluginAsyncSurrogate.cpp b/dom/plugins/ipc/PluginAsyncSurrogate.cpp index da07116cc..3fe4c7168 100644 --- a/dom/plugins/ipc/PluginAsyncSurrogate.cpp +++ b/dom/plugins/ipc/PluginAsyncSurrogate.cpp @@ -504,8 +504,6 @@ PluginAsyncSurrogate::WaitForInit() if (mAcceptCalls) { return true; } - Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGINASYNCSURROGATE_WAITFORINIT_MS> - timer(mParent->GetHistogramKey()); bool result = false; MOZ_ASSERT(mParent); if (mParent->IsChrome()) { diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index fee2d2f98..bdd15ca99 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -205,12 +205,8 @@ NPError PluginInstanceParent::Destroy() { NPError retval; - { // Scope for timer - Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGIN_INSTANCE_DESTROY_MS> - timer(Module()->GetHistogramKey()); - if (!CallNPP_Destroy(&retval)) { - retval = NPERR_GENERIC_ERROR; - } + if (!CallNPP_Destroy(&retval)) { + retval = NPERR_GENERIC_ERROR; } #if defined(OS_WIN) @@ -1785,9 +1781,6 @@ PluginInstanceParent::NPP_NewStream(NPMIMEType type, NPStream* stream, return NPERR_GENERIC_ERROR; } - Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGIN_STREAM_INIT_MS> - timer(Module()->GetHistogramKey()); - NPError err = NPERR_NO_ERROR; if (mParent->IsStartingAsync()) { MOZ_ASSERT(mSurrogate); diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index f04cd209c..300c4f621 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -2284,27 +2284,23 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance, return NS_ERROR_FAILURE; } - { // Scope for timer - Telemetry::AutoTimer<Telemetry::BLOCKED_ON_PLUGIN_INSTANCE_INIT_MS> - timer(GetHistogramKey()); - if (mIsStartingAsync) { - MOZ_ASSERT(surrogate); - surrogate->AsyncCallDeparting(); - if (!SendAsyncNPP_New(parentInstance)) { + if (mIsStartingAsync) { + MOZ_ASSERT(surrogate); + surrogate->AsyncCallDeparting(); + if (!SendAsyncNPP_New(parentInstance)) { + *error = NPERR_GENERIC_ERROR; + return NS_ERROR_FAILURE; + } + *error = NPERR_NO_ERROR; + } else { + if (!CallSyncNPP_New(parentInstance, error)) { + // if IPC is down, we'll get an immediate "failed" return, but + // without *error being set. So make sure that the error + // condition is signaled to nsNPAPIPluginInstance + if (NPERR_NO_ERROR == *error) { *error = NPERR_GENERIC_ERROR; - return NS_ERROR_FAILURE; - } - *error = NPERR_NO_ERROR; - } else { - if (!CallSyncNPP_New(parentInstance, error)) { - // if IPC is down, we'll get an immediate "failed" return, but - // without *error being set. So make sure that the error - // condition is signaled to nsNPAPIPluginInstance - if (NPERR_NO_ERROR == *error) { - *error = NPERR_GENERIC_ERROR; - } - return NS_ERROR_FAILURE; } + return NS_ERROR_FAILURE; } } |