document.currentScript should be null when running a script inside a shadow tree instead of being set to the old script element waiting on that script to finish. The following test is failing because of that: imported/w3c/web-platform-tests/shadow-dom/Document-prototype-currentScript.html
Created attachment 294642 [details] Fixes the bug
Comment on attachment 294642 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=294642&action=review r=me > Source/WebCore/dom/CurrentScriptIncrementer.h:46 > + m_document.pushCurrentScript(scriptElement.isInShadowTree() ? nullptr : &scriptElement); Later, it will be extended to handle module script elements.
Comment on attachment 294642 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=294642&action=review r=me >> Source/WebCore/dom/CurrentScriptIncrementer.h:46 >> + m_document.pushCurrentScript(scriptElement.isInShadowTree() ? nullptr : &scriptElement); > > Later, it will be extended to handle module script elements. Later, it will be extended to handle module script elements.
Comment on attachment 294642 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=294642&action=review >>> Source/WebCore/dom/CurrentScriptIncrementer.h:46 >>> + m_document.pushCurrentScript(scriptElement.isInShadowTree() ? nullptr : &scriptElement); >> >> Later, it will be extended to handle module script elements. > > Later, it will be extended to handle module script elements. Yup. Thanks for the review!
Comment on attachment 294642 [details] Fixes the bug Clearing flags on attachment: 294642 Committed r208660: <http://trac.webkit.org/changeset/208660>
All reviewed patches have been landed. Closing bug.
<rdar://problem/29237296>