diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-02-20 16:17:39 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-02-20 16:17:39 +0100 |
commit | 4c9b0837bef7d6acaa035868d40582c621d81a1d (patch) | |
tree | ebff614a717c3d7e47af3694b955e63bd0fd2b8b /js | |
parent | Fix issue with parallel builds (diff) | |
download | ice-4c9b0837bef7d6acaa035868d40582c621d81a1d.tar.bz2 ice-4c9b0837bef7d6acaa035868d40582c621d81a1d.tar.xz ice-4c9b0837bef7d6acaa035868d40582c621d81a1d.zip |
Additional fix for ICE-6268, fixed struct un-marshalling in JavaScript
Diffstat (limited to 'js')
-rw-r--r-- | js/src/Ice/Struct.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/src/Ice/Struct.js b/js/src/Ice/Struct.js index 2e28ab1bc72..303775fe684 100644 --- a/js/src/Ice/Struct.js +++ b/js/src/Ice/Struct.js @@ -163,9 +163,12 @@ Ice.Slice.defineStruct = function(constructor, legalKeyType, writeImpl, readImpl } v.__write(os); }; - obj.read = function(is) + obj.read = function(is, v) { - var v = new this(); + if(!v || !(v instanceof this)) + { + v = new this(); + } v.__read(is); return v; }; |