Description[ES6 modules] accessing document.currentScript on module scripts should not crash
Before this CL, accessing document.currentScript caused crash. It dereferenced nullptr
pushed to Document::current_script_stack_ by ScriptLoader::DoExecuteScript() for
script == ScriptType::kModule.
This CL adds null check in Document::currentScriptForBinding so that it is aware that
the item on the stack may be nullptr.
TEST=wpt/html/semantics/scripting-1/the-script-element/module/currentScript-null.html
BUG=716951
Review-Url: https://codereview.chromium.org/2860913002
Cr-Commit-Position: refs/heads/master@{#469435}
Committed: https://chromium.googlesource.com/chromium/src/+/3d379f511131f8692bc7f46e617794d685935a0b
Patch Set 1 #Patch Set 2 : domenic #
Total comments: 1
Patch Set 3 : remove bad title #
Messages
Total messages: 23 (12 generated)
|