Bug 80467 - Array.prototype functions should throw if delete fails
Summary: Array.prototype functions should throw if delete fails
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
Depends on:
Reported: 2012-03-06 18:12 PST by Gavin Barraclough
Modified: 2012-03-06 23:49 PST (History)
1 user (show)

See Also:

Fix (26.72 KB, patch)
2012-03-06 18:16 PST, Gavin Barraclough
no flags Details | Formatted Diff | Diff
Fix (forgot a ChangeLog in last patch) (26.83 KB, patch)
2012-03-06 18:24 PST, Gavin Barraclough
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2012-03-06 18:12:39 PST
All calls to [[Delete]] from Array.prototype are specified to pass 'true' as the value of Throw.  In the case of shift/unshift, these are also missing a throw from the 'put' in the implementations in JSArray.cpp.  There are effectively three copies of each of the generic shift/unshift routines, one in splice, one in ArrayPrototype's shift/unshift methods, and one in JSArray's shift/unshift routines, for handling arrays with holes.  These three copies should be unified.
Comment 1 Gavin Barraclough 2012-03-06 18:16:16 PST
Created attachment 130505 [details]
Comment 2 WebKit Review Bot 2012-03-06 18:18:32 PST
Attachment 130505 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1
LayoutTests/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 11 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gavin Barraclough 2012-03-06 18:24:17 PST
Created attachment 130509 [details]
Fix (forgot a ChangeLog in last patch)
Comment 4 Gavin Barraclough 2012-03-06 23:49:13 PST
Fixed in r110026