mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibJS: Don't suppress GlobalObject variable lookup exceptions
In HackStudio's Debugger a custom GlobalObject is used to reflect debugger variables into the JS scope by overriding GlobalObject's get method. However, when throwing a custom error during that lookup it was replaced with the generic "not found" js exception. This patch makes it instead pass along the custom error.
This commit is contained in:
parent
6c2ec4c1a4
commit
bee16bb83a
2 changed files with 4 additions and 1 deletions
|
@ -1251,7 +1251,8 @@ Value Identifier::execute(Interpreter& interpreter, GlobalObject& global_object)
|
|||
|
||||
auto value = interpreter.vm().get_variable(string(), global_object);
|
||||
if (value.is_empty()) {
|
||||
interpreter.vm().throw_exception<ReferenceError>(global_object, ErrorType::UnknownIdentifier, string());
|
||||
if (!interpreter.exception())
|
||||
interpreter.vm().throw_exception<ReferenceError>(global_object, ErrorType::UnknownIdentifier, string());
|
||||
return {};
|
||||
}
|
||||
return value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue