Index: src/uri.js |
diff --git a/src/uri.js b/src/uri.js |
index e94b3fe56a8ff19cb0240524c250a1c1c59647a4..72ca6f1565daa2d1b755e73622486afa4e1ddfc5 100644 |
--- a/src/uri.js |
+++ b/src/uri.js |
@@ -166,7 +166,10 @@ function URIDecodeOctets(octets, result, index) { |
// ECMA-262, section 15.1.3 |
function Encode(uri, unescape) { |
var uriLength = uri.length; |
- var result = new $Array(uriLength); |
+ // We are going to pass result to %StringFromCharCodeArray |
+ // which does not expect any getters/setters installed |
+ // on the incoming array. |
+ var result = new InternalArray(uriLength); |
var index = 0; |
for (var k = 0; k < uriLength; k++) { |
var cc1 = uri.charCodeAt(k); |
@@ -192,7 +195,10 @@ function Encode(uri, unescape) { |
// ECMA-262, section 15.1.3 |
function Decode(uri, reserved) { |
var uriLength = uri.length; |
- var result = new $Array(uriLength); |
+ // We are going to pass result to %StringFromCharCodeArray |
+ // which does not expect any getters/setters installed |
+ // on the incoming array. |
+ var result = new InternalArray(uriLength); |
var index = 0; |
for (var k = 0; k < uriLength; k++) { |
var ch = uri.charAt(k); |