Bug 1563405, part 1 - Call AddAttributes earlier in XULContentSinkImpl::OpenRoot(). r=bzbarsky

AddAttributes has no side effects on |this|, so that's okay.

Also remove an extra semi colon.

Differential Revision: https://phabricator.services.mozilla.com/D36845

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew McCreight 2019-07-04 05:53:32 +00:00
Родитель 33c16fe2ba
Коммит 309967ce04
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -53,7 +53,6 @@
#include "XULDocument.h"
static mozilla::LazyLogModule gContentSinkLog("nsXULContentSink");
;
//----------------------------------------------------------------------
@ -627,14 +626,14 @@ nsresult XULContentSinkImpl::OpenRoot(const char16_t** aAttributes,
// Create the element
RefPtr<nsXULPrototypeElement> element = new nsXULPrototypeElement(aNodeInfo);
// Push the element onto the context stack, so that child
// containers will hook up to us as their parent.
mContextStack.Push(element, mState);
// Add the attributes
nsresult rv = AddAttributes(aAttributes, aAttrLen, element);
if (NS_FAILED(rv)) return rv;
// Push the element onto the context stack, so that child
// containers will hook up to us as their parent.
mContextStack.Push(element, mState);
mState = eInDocumentElement;
return NS_OK;
}