From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- js/src/tests/non262/extensions/regress-455380.js | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 js/src/tests/non262/extensions/regress-455380.js (limited to 'js/src/tests/non262/extensions/regress-455380.js') diff --git a/js/src/tests/non262/extensions/regress-455380.js b/js/src/tests/non262/extensions/regress-455380.js new file mode 100644 index 0000000000..f0405621da --- /dev/null +++ b/js/src/tests/non262/extensions/regress-455380.js @@ -0,0 +1,60 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: Robert Sayre + */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 455380; +var summary = 'Do not assert with JIT: !lhs->isQuad() && !rhs->isQuad()'; +var actual = 'No Crash'; +var expect = 'No Crash'; + +printBugNumber(BUGNUMBER); +printStatus (summary); + + +const IS_TOKEN_ARRAY = + [0, 0, 0, 0, 0, 0, 0, 0, // 0 + 0, 0, 0, 0, 0, 0, 0, 0, // 8 + 0, 0, 0, 0, 0, 0, 0, 0, // 16 + 0, 0, 0, 0, 0, 0, 0, 0, // 24 + + 0, 1, 0, 1, 1, 1, 1, 1, // 32 + 0, 0, 1, 1, 0, 1, 1, 0, // 40 + 1, 1, 1, 1, 1, 1, 1, 1, // 48 + 1, 1, 0, 0, 0, 0, 0, 0, // 56 + + 0, 1, 1, 1, 1, 1, 1, 1, // 64 + 1, 1, 1, 1, 1, 1, 1, 1, // 72 + 1, 1, 1, 1, 1, 1, 1, 1, // 80 + 1, 1, 1, 0, 0, 0, 1, 1, // 88 + + 1, 1, 1, 1, 1, 1, 1, 1, // 96 + 1, 1, 1, 1, 1, 1, 1, 1, // 104 + 1, 1, 1, 1, 1, 1, 1, 1, // 112 + 1, 1, 1, 0, 1, 0, 1]; // 120 + +const headerUtils = { +normalizeFieldName: function(fieldName) +{ + if (fieldName == "") + throw "error: empty string"; + + for (var i = 0, sz = fieldName.length; i < sz; i++) + { + if (!IS_TOKEN_ARRAY[fieldName.charCodeAt(i)]) + { + throw (fieldName + " is not a valid header field name!"); + } + } + + return fieldName.toLowerCase(); +} +}; + +headerUtils.normalizeFieldName("Host"); + + +reportCompare(expect, actual, summary); -- cgit v1.2.3