Open Bug 1297504 Opened 9 years ago Updated 5 years ago

Don't reset document.currentScript to old value until current script finishes running

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: deckycoss, Unassigned)

Details

according to the spec, currentScript should point to the script that is currently being executed, until that execution stops. (https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block) however, the failing "script-window-error" test shows that currentScript is reset to the old value early, before the current script's exceptions are reported: http://w3c-test.org/html/dom/documents/dom-tree-accessors/Document.currentScript.sub.html this can possibly be fixed by moving the AutoEntryScript instance to the same scope as scriptUpdater: https://hg.mozilla.org/mozilla-central/file/052656fc513c/dom/base/nsScriptLoader.cpp#l1998
Hi Decky, is this something we plan to do in the next few months (P2) or a nice-to-have (P3, backlog)?
Flags: needinfo?(coss)
i would prefer to defer that question to ehsan.
Flags: needinfo?(coss) → needinfo?(ehsan)
Decky's internship is finished, so I think this will be a nice to have bug on the back burner until someone decides to pick it up!
Flags: needinfo?(ehsan)
Thanks Decky and Ehsan for the input.
Priority: -- → P3

Bulk-downgrade of unassigned, >=3 years untouched DOM/Storage bug's priority.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.