From 5d8c10a42446880a59e87ed0af9242c69a868ae5 Mon Sep 17 00:00:00 2001 From: Emma Malysz Date: Tue, 29 Oct 2019 16:04:29 +0000 Subject: [PATCH] Bug 1591588, remove ComputeIndexOf call and negative index check from within GetWholeText r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D50885 --HG-- extra : moz-landing-system : lando --- dom/base/Text.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/dom/base/Text.cpp b/dom/base/Text.cpp index 03d28bf7325d..faaa67388dee 100644 --- a/dom/base/Text.cpp +++ b/dom/base/Text.cpp @@ -89,15 +89,6 @@ void Text::GetWholeText(nsAString& aWholeText, ErrorResult& aRv) { return; } - int32_t index = parent->ComputeIndexOf(this); - NS_WARNING_ASSERTION(index >= 0, - "Trying to use .wholeText with an anonymous" - "text node child of a binding parent?"); - if (NS_WARN_IF(index < 0)) { - aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); - return; - } - Text* first = FirstLogicallyAdjacentTextNode(this); Text* last = LastLogicallyAdjacentTextNode(this);