THRIFT-813: fix for broken list deserialization
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@962853 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/js/test/test.html b/lib/js/test/test.html
index 903ea40..983a2f4 100644
--- a/lib/js/test/test.html
+++ b/lib/js/test/test.html
@@ -46,7 +46,7 @@
document.write("client.testStruct() => "+(client.testStruct(xtr).string_thing == "worked")+"<br/>")
document.write("client.testNest() => "+(client.testNest(xtr2).struct_thing.string_thing == "worked")+"<br/>")
document.write("client.testMap() => "+(client.testMap(insanity.userMap)[ThriftTest.Numberz.ONE] == 1)+"<br/>")
- document.write("client.testList() => "+(client.testList(list).length == 3)+"<br/>")
+ document.write("client.testList() => "+(client.testList(list).length == 3 && client.testList(list)[1] == 2)+"<br/>")
document.write("client.testSet() => "+(client.testSet(list).length == 3)+"<br/>")
document.write("client.testEnum() => "+(client.testEnum(ThriftTest.Numberz.ONE) == ThriftTest.Numberz.ONE)+"<br/>")
diff --git a/lib/js/thrift.js b/lib/js/thrift.js
index b70986f..5e9c89e 100644
--- a/lib/js/thrift.js
+++ b/lib/js/thrift.js
@@ -577,7 +577,7 @@
this.rpos.push(this.rstack.length);
- this.rstack.push(list.shift())
+ this.rstack.push(list)
return r;