Summary: | Consider removal of removes jsNull()/v8::Null() from JSInternalsCustom.cpp/V8InternalsCustom.cpp | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vineet Chaudhary (vineetc) <code.vineet> | ||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | eric.carlson, haraken, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 82319 | ||||||
Attachments: |
|
Description
Vineet Chaudhary (vineetc)
2012-03-28 02:45:03 PDT
Created attachment 134250 [details]
proposed patch
Attacjing proposed patch. This will test if any test case failures.
Please us know if any objections/suggestions. Thanks.
eric.carlson: Would you take a look at the change? (See also https://bugs.webkit.org/show_bug.cgi?id=82319) The behavior when the Vector is empty is not spec-ed, and we guess that we can remove the code that returns null when the Vector is empty. (In reply to comment #1) > Attacjing proposed patch. This will test if any test case failures. If no existing tests are affected, maybe we want to add test cases for this. (In reply to comment #3) > (In reply to comment #1) > > Attaching proposed patch. This will test if any test case failures. > > If no existing tests are affected, maybe we want to add test cases for this. Currently there is already a test case http://trac.webkit.org/browser/trunk/LayoutTests/fast/harness/user-preferred-language.html?rev=105315#L20 which checks for empty vector but this wont fail even if we remove if (languages.isEmpty()) return jsNull(); Because all the platform have the implementation for platformLanguages(). (In reply to comment #2) > eric.carlson: Would you take a look at the change? (See also https://bugs.webkit.org/show_bug.cgi?id=82319) The behavior when the Vector is empty is not spec-ed, and we guess that we can remove the code that returns null when the Vector is empty. This seems like a reasonable change to me. (In reply to comment #5) > (In reply to comment #2) > > eric.carlson: Would you take a look at the change? (See also https://bugs.webkit.org/show_bug.cgi?id=82319) The behavior when the Vector is empty is not spec-ed, and we guess that we can remove the code that returns null when the Vector is empty. > > This seems like a reasonable change to me. As per comment #4 the test case covers empty vector case. Do I need to add more coverage for the test? Comment on attachment 134250 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=134250&action=review > Source/WebCore/ChangeLog:9 > + No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass > + even after these changes. OK, it would be hard to add a new test case for this change. Comment on attachment 134250 [details] proposed patch Clearing flags on attachment: 134250 Committed r112502: <http://trac.webkit.org/changeset/112502> All reviewed patches have been landed. Closing bug. |