mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:35:08 +00:00
LibJS+Everywhere: Remove all VM::clear_exception() calls
Since VM::exception() no longer exists this is now useless. All of these calls to clear_exception were just to clear the VM state after some (potentially) failed evaluation and did not use the exception itself.
This commit is contained in:
parent
9264f9d24e
commit
1c4c251be3
14 changed files with 2 additions and 27 deletions
|
@ -159,10 +159,9 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::compile)
|
|||
// FIXME: This shouldn't block!
|
||||
auto buffer_or_error = vm.argument(0).to_object(global_object);
|
||||
JS::Value rejection_value;
|
||||
if (buffer_or_error.is_error()) {
|
||||
if (buffer_or_error.is_error())
|
||||
rejection_value = *buffer_or_error.throw_completion().value();
|
||||
vm.clear_exception();
|
||||
}
|
||||
|
||||
auto promise = JS::Promise::create(global_object);
|
||||
if (!rejection_value.is_empty()) {
|
||||
promise->reject(rejection_value);
|
||||
|
@ -217,7 +216,6 @@ JS::ThrowCompletionOr<size_t> WebAssemblyObject::instantiate_module(Wasm::Module
|
|||
|
||||
auto result_or_error = JS::call(global_object, function, JS::js_undefined(), move(argument_values));
|
||||
if (result_or_error.is_error()) {
|
||||
vm.clear_exception();
|
||||
return Wasm::Trap();
|
||||
}
|
||||
if (type.results().is_empty())
|
||||
|
@ -325,7 +323,6 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyObject::instantiate)
|
|||
bool should_return_module = false;
|
||||
if (buffer_or_error.is_error()) {
|
||||
auto rejection_value = *buffer_or_error.throw_completion().value();
|
||||
vm.clear_exception();
|
||||
promise->reject(rejection_value);
|
||||
return promise;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue