зеркало из https://github.com/mozilla/gecko-dev.git
Bug 379797 - Various dump() methods should check browser.dom.window.dump.enabled. r=krizsa
Checking this pref to avoid log spam in opt builds, in sandboxes, JS components, and whatever uses nsFrameMessageManager's dump method. This does mean that on Windows in an opt build when a debugger is present a debug string will no longer be printed unless the pref is set, but I think that is consistent with the non-Windows behavior. MozReview-Commit-ID: FWLAzBRVhlx --HG-- extra : rebase_source : cc5669f422729788f1ebc300d4450290913a3055
This commit is contained in:
Родитель
bae82564b3
Коммит
8085e87bc3
|
@ -812,6 +812,10 @@ nsFrameMessageManager::ReleaseCachedProcesses()
|
|||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::Dump(const nsAString& aStr)
|
||||
{
|
||||
if (!nsContentUtils::DOMWindowDumpEnabled()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
__android_log_print(ANDROID_LOG_INFO, "Gecko", "%s", NS_ConvertUTF16toUTF8(aStr).get());
|
||||
#endif
|
||||
|
|
|
@ -86,6 +86,10 @@ static LazyLogModule gJSCLLog("JSComponentLoader");
|
|||
static bool
|
||||
Dump(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
if (!nsContentUtils::DOMWindowDumpEnabled()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
|
||||
if (args.length() == 0)
|
||||
|
|
|
@ -114,6 +114,10 @@ xpc::NewSandboxConstructor()
|
|||
static bool
|
||||
SandboxDump(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
if (!nsContentUtils::DOMWindowDumpEnabled()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
|
||||
if (args.length() == 0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче