diff --git a/mozilla/accessible/src/html/nsHyperTextAccessible.cpp b/mozilla/accessible/src/html/nsHyperTextAccessible.cpp
index 871457b3a2c..c0247e500a4 100644
--- a/mozilla/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/mozilla/accessible/src/html/nsHyperTextAccessible.cpp
@@ -198,7 +198,6 @@ void nsHyperTextAccessible::CacheChildren()
// Special case for text entry fields, go directly to editor's root for children
if (mAccChildCount == eChildCountUninitialized) {
- mAccChildCount = 0; // Avoid reentry
PRUint32 role;
GetRole(&role);
if (role != nsIAccessibleRole::ROLE_ENTRY && role != nsIAccessibleRole::ROLE_PASSWORD_TEXT) {
@@ -211,6 +210,7 @@ void nsHyperTextAccessible::CacheChildren()
nsAccessible::CacheChildren();
return;
}
+ mAccChildCount = 0; // Avoid reentry
nsCOMPtr editorRoot;
editor->GetRootElement(getter_AddRefs(editorRoot));
nsCOMPtr editorRootDOMNode = do_QueryInterface(editorRoot);