[Webkit-unassigned] [Bug 160992] New: Wrong error message for a program that calls a function with arguments that do a getByVal off of undefined
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 18 20:53:36 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160992
Bug ID: 160992
Summary: Wrong error message for a program that calls a
function with arguments that do a getByVal off of
undefined
Classification: Unclassified
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sbarati at apple.com
CC: benjamin at webkit.org, fpizlo at apple.com,
ggaren at apple.com, gskachkov at gmail.com,
jfbastien at apple.com, joepeck at webkit.org,
keith_miller at apple.com, mark.lam at apple.com,
msaboff at apple.com, oliver at apple.com,
sukolsak at gmail.com, ticaiolima at gmail.com,
utatane.tea at gmail.com
We print the wrong error message in this program:
```
function foo() {
let additions = [
[10, 20],
//[{}, Symbol()]
[{}, {}]
];
let addedAdditions = [];
let allItems = [];
let map = new Map;
map.set('foo', 'bar');
map.set(20, {});
//let item;
for (let item of map) {
if (item[0] === 20) {
map.delete(20);
map.set(30, 40);
}
print(JSON.stringify(item));
let addition = additions.pop();
addedAdditions.push(addition);
allItems.push(item);
print(addition);
map.set(addition[0], addition[1]);
}
}
foo();
```
We print:
Exception: TypeError: undefined is not an object (evaluating 'map.set')
even though it's "addition[0]" where the undefined load is happening.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160819/bc68d16b/attachment-0001.html>
More information about the webkit-unassigned
mailing list