diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-10-10 17:58:30 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-10-10 17:58:30 -0700 |
commit | 3b1d656da56bdd403d1625a0c6a44d75cde36cc1 (patch) | |
tree | 80de8a68eacd596f0d120efc65dbbae3f324aea0 /deps/v8/src/uri.js | |
parent | 9bbca99107652906a060679ee95bf1ad7381cbb5 (diff) | |
download | node-new-3b1d656da56bdd403d1625a0c6a44d75cde36cc1.tar.gz |
Revert "Upgrade V8 to 3.6.6"
Not stable enough.
- Windows snapshot linking broken
- Linux crash on ./node_g test/simple/test-stream-pipe-multi.js
This reverts commit 56e6952e639ba1557a5b22333788583e9e39fa29.
Diffstat (limited to 'deps/v8/src/uri.js')
-rw-r--r-- | deps/v8/src/uri.js | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/deps/v8/src/uri.js b/deps/v8/src/uri.js index 1656664a3d..c910d756b4 100644 --- a/deps/v8/src/uri.js +++ b/deps/v8/src/uri.js @@ -111,59 +111,47 @@ function URIDecodeOctets(octets, result, index) { var o1 = octets[1]; if (o0 < 0xe0) { var a = o0 & 0x1f; - if ((o1 < 0x80) || (o1 > 0xbf)) { + if ((o1 < 0x80) || (o1 > 0xbf)) throw new $URIError("URI malformed"); - } var b = o1 & 0x3f; value = (a << 6) + b; - if (value < 0x80 || value > 0x7ff) { + if (value < 0x80 || value > 0x7ff) throw new $URIError("URI malformed"); - } } else { var o2 = octets[2]; if (o0 < 0xf0) { var a = o0 & 0x0f; - if ((o1 < 0x80) || (o1 > 0xbf)) { + if ((o1 < 0x80) || (o1 > 0xbf)) throw new $URIError("URI malformed"); - } var b = o1 & 0x3f; - if ((o2 < 0x80) || (o2 > 0xbf)) { + if ((o2 < 0x80) || (o2 > 0xbf)) throw new $URIError("URI malformed"); - } var c = o2 & 0x3f; value = (a << 12) + (b << 6) + c; - if ((value < 0x800) || (value > 0xffff)) { + if ((value < 0x800) || (value > 0xffff)) throw new $URIError("URI malformed"); - } } else { var o3 = octets[3]; if (o0 < 0xf8) { var a = (o0 & 0x07); - if ((o1 < 0x80) || (o1 > 0xbf)) { + if ((o1 < 0x80) || (o1 > 0xbf)) throw new $URIError("URI malformed"); - } var b = (o1 & 0x3f); - if ((o2 < 0x80) || (o2 > 0xbf)) { + if ((o2 < 0x80) || (o2 > 0xbf)) throw new $URIError("URI malformed"); - } var c = (o2 & 0x3f); - if ((o3 < 0x80) || (o3 > 0xbf)) { + if ((o3 < 0x80) || (o3 > 0xbf)) throw new $URIError("URI malformed"); - } var d = (o3 & 0x3f); value = (a << 18) + (b << 12) + (c << 6) + d; - if ((value < 0x10000) || (value > 0x10ffff)) { + if ((value < 0x10000) || (value > 0x10ffff)) throw new $URIError("URI malformed"); - } } else { throw new $URIError("URI malformed"); } } } } - if (0xD800 <= value && value <= 0xDFFF) { - throw new $URIError("URI malformed"); - } if (value < 0x10000) { result[index++] = value; return index; @@ -226,8 +214,7 @@ function Decode(uri, reserved) { if (k + 3 * (n - 1) >= uriLength) throw new $URIError("URI malformed"); for (var i = 1; i < n; i++) { if (uri.charAt(++k) != '%') throw new $URIError("URI malformed"); - octets[i] = URIHexCharsToCharCode(uri.charCodeAt(++k), - uri.charCodeAt(++k)); + octets[i] = URIHexCharsToCharCode(uri.charCodeAt(++k), uri.charCodeAt(++k)); } index = URIDecodeOctets(octets, result, index); } else { @@ -379,9 +366,7 @@ function CharCodeToHex4Str(cc) { function IsValidHex(s) { for (var i = 0; i < s.length; ++i) { var cc = s.charCodeAt(i); - if ((48 <= cc && cc <= 57) || - (65 <= cc && cc <= 70) || - (97 <= cc && cc <= 102)) { + if ((48 <= cc && cc <= 57) || (65 <= cc && cc <= 70) || (97 <= cc && cc <= 102)) { // '0'..'9', 'A'..'F' and 'a' .. 'f'. } else { return false; |