Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: src/string.js

Issue 14972015: Fix bogus arguments length check in StringLocaleCompare. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // ECMA-262 section 15.5.4.9 164 // ECMA-262 section 15.5.4.9
165 // 165 //
166 // This function is implementation specific. For now, we do not 166 // This function is implementation specific. For now, we do not
167 // do anything locale specific. 167 // do anything locale specific.
168 function StringLocaleCompare(other) { 168 function StringLocaleCompare(other) {
169 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { 169 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
170 throw MakeTypeError("called_on_null_or_undefined", 170 throw MakeTypeError("called_on_null_or_undefined",
171 ["String.prototype.localeCompare"]); 171 ["String.prototype.localeCompare"]);
172 } 172 }
173 if (%_ArgumentsLength() === 0) return 0;
174 return %StringLocaleCompare(TO_STRING_INLINE(this), 173 return %StringLocaleCompare(TO_STRING_INLINE(this),
175 TO_STRING_INLINE(other)); 174 TO_STRING_INLINE(other));
176 } 175 }
177 176
178 177
179 // ECMA-262 section 15.5.4.10 178 // ECMA-262 section 15.5.4.10
180 function StringMatch(regexp) { 179 function StringMatch(regexp) {
181 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { 180 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
182 throw MakeTypeError("called_on_null_or_undefined", 181 throw MakeTypeError("called_on_null_or_undefined",
183 ["String.prototype.match"]); 182 ["String.prototype.match"]);
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 "fixed", StringFixed, 1038 "fixed", StringFixed,
1040 "italics", StringItalics, 1039 "italics", StringItalics,
1041 "small", StringSmall, 1040 "small", StringSmall,
1042 "strike", StringStrike, 1041 "strike", StringStrike,
1043 "sub", StringSub, 1042 "sub", StringSub,
1044 "sup", StringSup 1043 "sup", StringSup
1045 )); 1044 ));
1046 } 1045 }
1047 1046
1048 SetUpString(); 1047 SetUpString();
OLDNEW
« no previous file with comments | « no previous file | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698