idompent
This commit is contained in:
@@ -8837,8 +8837,7 @@ static JSValue js_cell_array_sort (JSContext *ctx, JSValue this_val, int argc, J
|
||||
arr = JS_VALUE_GET_ARRAY (arr_ref.val);
|
||||
items[i] = arr->values[i];
|
||||
}
|
||||
} else if (JS_VALUE_GET_TAG (argv[1]) == JS_TAG_STRING
|
||||
|| JS_VALUE_GET_TAG (argv[1]) == JS_TAG_STRING_IMM) {
|
||||
} else if (JS_VALUE_IS_TEXT (argv[1])) {
|
||||
JSValue prop_key = js_key_from_string (ctx, argv[1]);
|
||||
/* Re-read items[i] (js_key_from_string no longer allocates, but re-read is harmless) */
|
||||
arr = JS_VALUE_GET_ARRAY (arr_ref.val);
|
||||
@@ -8870,7 +8869,7 @@ static JSValue js_cell_array_sort (JSContext *ctx, JSValue this_val, int argc, J
|
||||
if (key_tag == JS_TAG_INT || key_tag == JS_TAG_FLOAT64 || key_tag == JS_TAG_SHORT_FLOAT) {
|
||||
JS_ToFloat64 (ctx, &keys[i], key);
|
||||
if (i == 0) is_string = 0;
|
||||
} else if (key_tag == JS_TAG_STRING || key_tag == JS_TAG_STRING_IMM) {
|
||||
} else if (JS_VALUE_IS_TEXT (key)) {
|
||||
if (i == 0) {
|
||||
is_string = 1;
|
||||
str_keys = alloca (sizeof (char *) * len);
|
||||
|
||||
Reference in New Issue
Block a user