WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 163426
160992
Wrong error message for a program that calls a function with arguments that do a getByVal off of undefined
https://bugs.webkit.org/show_bug.cgi?id=160992
Summary
Wrong error message for a program that calls a function with arguments that d...
Saam Barati
Reported
2016-08-18 20:53:36 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2016-10-13 20:24:00 PDT
This is fixed by
bug 163426
! *** This bug has been marked as a duplicate of
bug 163426
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug