Closed
Bug 1459309
Opened 6 years ago
Closed 6 years ago
currentScript should be null when evaluating scripts from shadow DOM
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 file)
3.64 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
Fixing also the test. Better to null check before accessing the variable and there are two tests with the same name and there is a warning about that in the console. remote: remote: View your change here: remote: https://hg.mozilla.org/try/rev/258d3457761190cebc4f2dbf413961a750366a94 remote: remote: Follow the progress of your build on Treeherder: remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=258d3457761190cebc4f2dbf413961a750366a94 remote: recorded changegroup in replication log in 0.100s
Attachment #8973311 -
Flags: review?(peterv)
Updated•6 years ago
|
Priority: -- → P2
Comment 1•6 years ago
|
||
Comment on attachment 8973311 [details] [diff] [review] shadow_current_script.diff Review of attachment 8973311 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/script/ScriptLoader.h @@ +57,5 @@ > , mScriptLoader(aScriptLoader) > { > + nsCOMPtr<nsINode> node = do_QueryInterface(aCurrentScript); > + mScriptLoader->mCurrentScript = > + node && !node->IsInShadowTree() ? aCurrentScript : nullptr; Hmm, not sure how node can be null here?
Attachment #8973311 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 2•6 years ago
|
||
Because when dealing with JS modules, aCurrentScript is null.
Assignee | ||
Comment 3•6 years ago
|
||
oh, I never landed this
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/29b727bc2caa currentScript should be null when evaluating scripts from shadow DOM, r=peterv
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/11119 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/29b727bc2caa
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Upstream PR merged
You need to log in
before you can comment on or make changes to this bug.
Description
•