Because nsAString is nicer to work with than char16_t*. The patch relatedly changes nsIEmbeddingSiteWindow::title and nsIWindowMediator::updateWindowTitle as well.