[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}
Showing
Please register or sign in to comment