Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * Any copyright is dedicated to the Public Domain.
4 * http://creativecommons.org/licenses/publicdomain/
5 * Contributor: Robert Sayre
6 */
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 455380;
10 var summary = 'Do not assert with JIT: !lhs->isQuad() && !rhs->isQuad()';
11 var actual = 'No Crash';
12 var expect = 'No Crash';
14 printBugNumber(BUGNUMBER);
15 printStatus (summary);
17 jit(true);
19 const IS_TOKEN_ARRAY =
20 [0, 0, 0, 0, 0, 0, 0, 0, // 0
21 0, 0, 0, 0, 0, 0, 0, 0, // 8
22 0, 0, 0, 0, 0, 0, 0, 0, // 16
23 0, 0, 0, 0, 0, 0, 0, 0, // 24
25 0, 1, 0, 1, 1, 1, 1, 1, // 32
26 0, 0, 1, 1, 0, 1, 1, 0, // 40
27 1, 1, 1, 1, 1, 1, 1, 1, // 48
28 1, 1, 0, 0, 0, 0, 0, 0, // 56
30 0, 1, 1, 1, 1, 1, 1, 1, // 64
31 1, 1, 1, 1, 1, 1, 1, 1, // 72
32 1, 1, 1, 1, 1, 1, 1, 1, // 80
33 1, 1, 1, 0, 0, 0, 1, 1, // 88
35 1, 1, 1, 1, 1, 1, 1, 1, // 96
36 1, 1, 1, 1, 1, 1, 1, 1, // 104
37 1, 1, 1, 1, 1, 1, 1, 1, // 112
38 1, 1, 1, 0, 1, 0, 1]; // 120
40 const headerUtils = {
41 normalizeFieldName: function(fieldName)
42 {
43 if (fieldName == "")
44 throw "error: empty string";
46 for (var i = 0, sz = fieldName.length; i < sz; i++)
47 {
48 if (!IS_TOKEN_ARRAY[fieldName.charCodeAt(i)])
49 {
50 throw (fieldName + " is not a valid header field name!");
51 }
52 }
54 return fieldName.toLowerCase();
55 }
56 };
58 headerUtils.normalizeFieldName("Host");
60 jit(false);
62 reportCompare(expect, actual, summary);