mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibWeb: Don't attempt to run unparsed scripts
This commit is contained in:
parent
0bb680bacd
commit
e215580147
Notes:
sideshowbarker
2024-07-18 03:44:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e2155801478
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,12 @@ NonnullRefPtr<ClassicScript> ClassicScript::create(String filename, StringView s
|
|||
// https://html.spec.whatwg.org/multipage/webappapis.html#run-a-classic-script
|
||||
JS::Value ClassicScript::run(RethrowErrors rethrow_errors)
|
||||
{
|
||||
if (!m_script_record) {
|
||||
// FIXME: Throw a SyntaxError per the spec.
|
||||
dbgln("ClassicScript: Unable to run script {}", filename());
|
||||
return {};
|
||||
}
|
||||
|
||||
dbgln("ClassicScript: Running script {}", filename());
|
||||
(void)rethrow_errors;
|
||||
|
||||
|
|
Loading…
Reference in a new issue