Bug 1378079 - Part 2: Introduce throw-on-dynamic-markup-insertion counter.

Per spec, document objects have a throw-on-dynamic-markup-insertion counter, which is used in conjunction with the create an element for the token algorithm to prevent custom element constructors from being able to use document.open(), document.close(), and document.write() when they are invoked by the parser.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-18 20:26:28 -05:00 committed by Roy Tam
commit a3b5d98af7
3 changed files with 54 additions and 1 deletions

View file

@ -1329,7 +1329,8 @@ nsIDocument::nsIDocument()
mFrameRequestCallbacksScheduled(false),
mBidiOptions(IBMBIDI_DEFAULT_BIDI_OPTIONS),
mPartID(0),
mUserHasInteracted(false)
mUserHasInteracted(false),
mThrowOnDynamicMarkupInsertionCounter(0)
{
SetIsInDocument();