mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +00:00
LibJS+LibWeb: Clear exceptions after call'ing JavaScript functions
Decorated Interpreter::call() with [[nodiscard]] to provoke thinking about the returned value at each call site. This is definitely not perfect and we should really start thinking about slimming down the public-facing LibJS interpreter API. Fixes #3136.
This commit is contained in:
parent
c5127389ca
commit
bbe2d4a2d9
Notes:
sideshowbarker
2024-07-19 03:38:37 +09:00
Author: https://github.com/awesomekling
Commit: bbe2d4a2d9
7 changed files with 24 additions and 9 deletions
|
@ -98,7 +98,10 @@ void XMLHttpRequest::dispatch_event(NonnullRefPtr<DOM::Event> event)
|
|||
auto* this_value = wrap(global_object, *this);
|
||||
JS::MarkedValueList arguments(global_object.heap());
|
||||
arguments.append(wrap(global_object, *event));
|
||||
function.interpreter().call(function, this_value, move(arguments));
|
||||
auto& interpreter = function.interpreter();
|
||||
(void)interpreter.call(function, this_value, move(arguments));
|
||||
if (interpreter.exception())
|
||||
interpreter.clear_exception();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue