summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2022-04-17 19:07:03 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-17 19:07:08 -0500
commita4db4e9de25ffcc0ad11496bf9419932563321a0 (patch)
tree07d548f177167a8a8e8347c1f4c84cb37bbb5ce7 /js
parent93c5e399152c7358862e8f8cd21a0752439ed7b5 (diff)
downloadaura-central-a4db4e9de25ffcc0ad11496bf9419932563321a0.tar.gz
[JS:Builtin] 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 c70f8558b..233a7323b 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)