diff options
Diffstat (limited to 'js/src/tests/js1_5/extensions/regress-455380.js')
-rw-r--r-- | js/src/tests/js1_5/extensions/regress-455380.js | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/js/src/tests/js1_5/extensions/regress-455380.js b/js/src/tests/js1_5/extensions/regress-455380.js new file mode 100644 index 000000000..f0405621d --- /dev/null +++ b/js/src/tests/js1_5/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); |