Bug 1489790 - Part 7: Remove the XPCOM component registration for @mozilla.org/editor/editingcontroller;1; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D5362
This commit is contained in:
Ehsan Akhgari
2018-09-07 09:39:36 -04:00
parent 5e6db6fab9
commit 483cdb54e7
7 changed files with 33 additions and 40 deletions

View File

@@ -40,6 +40,7 @@
#include "nsStyleConsts.h"
#include "nsTextEditorState.h"
#include "nsIController.h"
#include "nsBaseCommandController.h"
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
@@ -638,9 +639,9 @@ HTMLTextAreaElement::GetControllers(ErrorResult& aError)
mControllers->AppendController(controller);
controller = do_CreateInstance("@mozilla.org/editor/editingcontroller;1", &rv);
if (NS_FAILED(rv)) {
aError.Throw(rv);
controller = nsBaseCommandController::CreateEditingController();
if (!controller) {
aError.Throw(NS_ERROR_FAILURE);
return nullptr;
}