THRIFT-4436: port nodejs changes from THRIFT-3748 to js lib,
test for serialization of nested list,
run all tests when building js lib
Client: js
This closes #1457
diff --git a/lib/js/src/thrift.js b/lib/js/src/thrift.js
index 5d420a2..eeae873 100644
--- a/lib/js/src/thrift.js
+++ b/lib/js/src/thrift.js
@@ -1258,7 +1258,12 @@
/** Deserializes the end of a list. */
readListEnd: function() {
- this.readFieldEnd();
+ var pos = this.rpos.pop() - 2;
+ var st = this.rstack;
+ st.pop();
+ if (st instanceof Array && st.length > pos && st[pos].length > 0) {
+ st.push(st[pos].shift());
+ }
},
/**