summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2022-04-13 17:07:05 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2022-04-18 01:12:25 +0800
commitf2ad2ba0def2430ff8fb8c79dd9e41dbe5ad128a (patch)
tree5dc856600e8db18e095452125baa39b49920f340 /js
parent2af23767e11b3eac41fd3164d241e820374eb969 (diff)
downloaduxp-f2ad2ba0def2430ff8fb8c79dd9e41dbe5ad128a.tar.gz
Issue #1382 - Set canonical name for trimStart and trimEnd functions
This is needed to fix the assertion on debug builds that self-hosted functions must have consistent names, as these two functions are aliased to `trimLeft` and `trimRight`.
Diffstat (limited to 'js')
-rw-r--r--js/src/builtin/String.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/src/builtin/String.js b/js/src/builtin/String.js
index c70f8558be..233a7323b2 100644
--- a/js/src/builtin/String.js
+++ b/js/src/builtin/String.js
@@ -969,12 +969,14 @@ function String_static_trimStart(string) {
ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimStart');
return callFunction(std_String_trimStart, string);
}
+_SetCanonicalName(String_static_trimStart, "trimStart");
function String_static_trimEnd(string) {
if (arguments.length < 1)
ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimEnd');
return callFunction(std_String_trimEnd, string);
}
+_SetCanonicalName(String_static_trimEnd, "trimEnd");
function String_static_toLocaleLowerCase(string) {
if (arguments.length < 1)