From 736af2bfa13981a9e95119cce8f4095756b934b3 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Mon, 23 Oct 2017 23:02:57 +0200 Subject: [PATCH] Backed out changeset 2602e10160a1 (bug 1410482) for leaks in devtools tests. r=backout --HG-- extra : amend_source : f3e557c54b1f7b5338547100d7edf83b30e96681 --- accessible/aom/AccessibleNode.cpp | 14 -------------- accessible/aom/AccessibleNode.h | 2 -- dom/webidl/AccessibleNode.webidl | 2 +- dom/webidl/Node.webidl | 2 +- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/accessible/aom/AccessibleNode.cpp b/accessible/aom/AccessibleNode.cpp index 4a3a23771a0f..2fb7583c8925 100644 --- a/accessible/aom/AccessibleNode.cpp +++ b/accessible/aom/AccessibleNode.cpp @@ -37,20 +37,6 @@ AccessibleNode::AccessibleNode(nsINode* aNode) : mDOMNode(aNode) } } -bool -AccessibleNode::IsAOMEnabled(JSContext* aCx, JSObject* /*unused*/) -{ - static bool sPrefCached = false; - static bool sPrefCacheValue = false; - - if (!sPrefCached) { - sPrefCached = true; - Preferences::AddBoolVarCache(&sPrefCacheValue, "accessibility.AOM.enabled"); - } - - return nsContentUtils::IsSystemCaller(aCx) || sPrefCacheValue; -} - AccessibleNode::~AccessibleNode() { } diff --git a/accessible/aom/AccessibleNode.h b/accessible/aom/AccessibleNode.h index 8527e1a4cb0a..71fc4609528f 100644 --- a/accessible/aom/AccessibleNode.h +++ b/accessible/aom/AccessibleNode.h @@ -49,8 +49,6 @@ public: a11y::Accessible* Internal() const { return mIntl; } - static bool IsAOMEnabled(JSContext*, JSObject*); - protected: AccessibleNode(const AccessibleNode& aCopy) = delete; AccessibleNode& operator=(const AccessibleNode& aCopy) = delete; diff --git a/dom/webidl/AccessibleNode.webidl b/dom/webidl/AccessibleNode.webidl index f4e132a3b58b..0a6d07eb3788 100644 --- a/dom/webidl/AccessibleNode.webidl +++ b/dom/webidl/AccessibleNode.webidl @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -[Func="AccessibleNode::IsAOMEnabled"] +[Pref="accessibility.AOM.enabled"] interface AccessibleNode { readonly attribute DOMString role; [Frozen, Cached, Pure] diff --git a/dom/webidl/Node.webidl b/dom/webidl/Node.webidl index d866685daef5..ac910435fc86 100644 --- a/dom/webidl/Node.webidl +++ b/dom/webidl/Node.webidl @@ -112,7 +112,7 @@ interface Node : EventTarget { DOMString generateXPath(); #ifdef ACCESSIBILITY - [Func="AccessibleNode::IsAOMEnabled"] + [Pref="accessibility.AOM.enabled"] readonly attribute AccessibleNode? accessibleNode; #endif };