зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1062484 - Change value of String.fromCodePoint.length to 1. r=till
This commit is contained in:
Родитель
bc89cfa2a7
Коммит
3581bae876
|
@ -148,8 +148,8 @@ function String_localeCompare(that) {
|
|||
return intl_CompareStrings(collator, S, That);
|
||||
}
|
||||
|
||||
/* ES6 Draft September 5, 2013 21.1.2.2 */
|
||||
function String_static_fromCodePoint() {
|
||||
// ES6 draft rev27 (2014/08/24) 21.1.2.2 String.fromCodePoint(...codePoints)
|
||||
function String_static_fromCodePoint(codePoints) {
|
||||
// Step 1. is not relevant
|
||||
// Step 2.
|
||||
var length = arguments.length;
|
||||
|
|
|
@ -4285,7 +4285,7 @@ js::str_fromCharCode_one_arg(JSContext *cx, HandleValue code, MutableHandleValue
|
|||
|
||||
static const JSFunctionSpec string_static_methods[] = {
|
||||
JS_FN("fromCharCode", js::str_fromCharCode, 1, 0),
|
||||
JS_SELF_HOSTED_FN("fromCodePoint", "String_static_fromCodePoint", 0,0),
|
||||
JS_SELF_HOSTED_FN("fromCodePoint", "String_static_fromCodePoint", 1, 0),
|
||||
JS_SELF_HOSTED_FN("raw", "String_static_raw", 2, 0),
|
||||
|
||||
// This must be at the end because of bug 853075: functions listed after
|
||||
|
|
|
@ -6,7 +6,7 @@ print(BUGNUMBER + ": " + summary);
|
|||
// Tests taken from:
|
||||
// https://github.com/mathiasbynens/String.fromCodePoint/blob/master/tests/tests.js
|
||||
|
||||
assertEq(String.fromCodePoint.length, 0);
|
||||
assertEq(String.fromCodePoint.length, 1);
|
||||
assertEq(String.propertyIsEnumerable('fromCodePoint'), false);
|
||||
|
||||
assertEq(String.fromCodePoint(''), '\0');
|
||||
|
|
Загрузка…
Ссылка в новой задаче