Bug 124676 - webkitdirs::checkForArgumentAndRemoveFromArrayRef() removes wrong element
Summary: webkitdirs::checkForArgumentAndRemoveFromArrayRef() removes wrong element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nick Diego Yamane (diegoyam)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-20 13:56 PST by Nick Diego Yamane (diegoyam)
Modified: 2013-11-21 18:59 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.84 KB, patch)
2013-11-20 14:22 PST, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff
Patch for landing (4.56 KB, patch)
2013-11-21 07:32 PST, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff
Patch for landing 2 (4.53 KB, patch)
2013-11-21 08:05 PST, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff
Patch (4.74 KB, patch)
2013-11-21 09:11 PST, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Diego Yamane (diegoyam) 2013-11-20 13:56:03 PST
webkitdirs::checkForArgumentAndRemoveFromArrayRef remove wrong elements when there were more then one occurrence of that argument.
E.g: Checking for 'a' in {a, b, a, c}, the resulting array would be {b, a}, when it should be {b, c}.
Comment 1 Nick Diego Yamane (diegoyam) 2013-11-20 14:22:05 PST
Created attachment 217480 [details]
Patch
Comment 2 Daniel Bates 2013-11-20 17:10:43 PST
Comment on attachment 217480 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=217480&action=review

This patch look a reasonable to me. Ideally, we could reduce some duplication of code in the unit test. For now, it's OK.

> Tools/ChangeLog:3
> +        Fix a bug in webkitdirs::checkForArgumentAndRemoveFromArrayRef

This title is ambiguous. I updated the Bugzilla bug title to be: webkitdirs::checkForArgumentAndRemoveFromArrayRef() removed wrong element

Feel free to use this bug title or come up with a more descriptive one.
Comment 3 Nick Diego Yamane (diegoyam) 2013-11-21 07:32:36 PST
Created attachment 217567 [details]
Patch for landing
Comment 4 Nick Diego Yamane (diegoyam) 2013-11-21 08:05:12 PST
Created attachment 217570 [details]
Patch for landing 2
Comment 5 Nick Diego Yamane (diegoyam) 2013-11-21 09:11:01 PST
Created attachment 217575 [details]
Patch
Comment 6 WebKit Commit Bot 2013-11-21 18:59:29 PST
Comment on attachment 217575 [details]
Patch

Clearing flags on attachment: 217575

Committed r159668: <http://trac.webkit.org/changeset/159668>
Comment 7 WebKit Commit Bot 2013-11-21 18:59:31 PST
All reviewed patches have been landed.  Closing bug.