diff --git a/dom/base/nsGlobalWindowInner.cpp b/dom/base/nsGlobalWindowInner.cpp index 4069dca4bb3b..e1b995a7f97a 100644 --- a/dom/base/nsGlobalWindowInner.cpp +++ b/dom/base/nsGlobalWindowInner.cpp @@ -4289,15 +4289,14 @@ nsGlobalWindowInner::ConvertDialogOptions(const nsAString& aOptions, } } -nsresult +void nsGlobalWindowInner::UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) { if (GetOuterWindowInternal()) { - return GetOuterWindowInternal()->UpdateCommands(anAction, aSel, aReason); + GetOuterWindowInternal()->UpdateCommands(anAction, aSel, aReason); } - return NS_OK; } Selection* diff --git a/dom/base/nsGlobalWindowInner.h b/dom/base/nsGlobalWindowInner.h index dc509285678d..cac0f9f591fd 100644 --- a/dom/base/nsGlobalWindowInner.h +++ b/dom/base/nsGlobalWindowInner.h @@ -896,7 +896,7 @@ public: const nsAString& aOptions, const mozilla::dom::Sequence& aExtraArgument, mozilla::ErrorResult& aError); - nsresult UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) override; + void UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason); void GetContent(JSContext* aCx, JS::MutableHandle aRetval, diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index ae7bd979df1c..347bf61d72a6 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -6364,7 +6364,7 @@ public: }; } // anonymous namespace -nsresult +void nsGlobalWindowOuter::UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) @@ -6377,13 +6377,14 @@ nsGlobalWindowOuter::UpdateCommands(const nsAString& anAction, nsContentUtils::AddScriptRunner( new ChildCommandDispatcher(root, child, anAction)); } - return NS_OK; + return; } } nsPIDOMWindowOuter *rootWindow = GetPrivateRoot(); - if (!rootWindow) - return NS_OK; + if (!rootWindow) { + return; + } nsCOMPtr xulDoc = do_QueryInterface(rootWindow->GetExtantDoc()); @@ -6399,8 +6400,6 @@ nsGlobalWindowOuter::UpdateCommands(const nsAString& anAction, anAction)); } } - - return NS_OK; } Selection* diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h index ca7ab07f3444..e5ce4adfb701 100644 --- a/dom/base/nsGlobalWindowOuter.h +++ b/dom/base/nsGlobalWindowOuter.h @@ -686,7 +686,7 @@ public: const nsAString& aOptions, nsISupports* aExtraArgument, nsPIDOMWindowOuter** _retval) override; - nsresult UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) override; + void UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) override; already_AddRefed GetContentInternal(mozilla::ErrorResult& aError, diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index d33a5f258470..a3e2fa023c5b 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -613,8 +613,6 @@ public: virtual nsresult Focus() = 0; virtual nsresult Close() = 0; - virtual nsresult UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) = 0; - mozilla::dom::DocGroup* GetDocGroup() const; virtual nsISerialEventTarget* EventTargetFor(mozilla::TaskCategory aCategory) const = 0; @@ -1138,7 +1136,7 @@ public: virtual nsresult MoveBy(int32_t aXDif, int32_t aYDif) = 0; - virtual nsresult UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) = 0; + virtual void UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason) = 0; mozilla::dom::DocGroup* GetDocGroup() const; virtual nsISerialEventTarget* diff --git a/dom/html/nsTextEditorState.cpp b/dom/html/nsTextEditorState.cpp index a8247d183732..99f82976626d 100644 --- a/dom/html/nsTextEditorState.cpp +++ b/dom/html/nsTextEditorState.cpp @@ -1127,7 +1127,8 @@ nsTextInputListener::UpdateTextInputCommands(const nsAString& commandsToUpdate, nsPIDOMWindowOuter *domWindow = doc->GetWindow(); NS_ENSURE_TRUE(domWindow, NS_ERROR_FAILURE); - return domWindow->UpdateCommands(commandsToUpdate, sel, reason); + domWindow->UpdateCommands(commandsToUpdate, sel, reason); + return NS_OK; } // END nsTextInputListener