diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2022-04-13 17:07:05 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2022-04-18 01:12:25 +0800 |
commit | f2ad2ba0def2430ff8fb8c79dd9e41dbe5ad128a (patch) | |
tree | 5dc856600e8db18e095452125baa39b49920f340 /js | |
parent | 2af23767e11b3eac41fd3164d241e820374eb969 (diff) | |
download | uxp-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.js | 2 |
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) |