
This fixes two cases obj[expr] and obj[expr]() (MemberExpression and CallExpression respectively) when expr throws an exception and results in an empty value, causing a crash by passing the invalid PropertyName created by computed_property_name() to Object::get() without checking it first. Fixes #3459.
8 lines
219 B
JavaScript
8 lines
219 B
JavaScript
test("Issue #3459, exception in computed property expression", () => {
|
|
expect(() => {
|
|
"foo"[bar];
|
|
}).toThrow(ReferenceError);
|
|
expect(() => {
|
|
"foo"[bar]();
|
|
}).toThrow(ReferenceError);
|
|
});
|