diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-11-05 15:33:01 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-11-05 15:33:01 +0100 |
commit | cb4d5772e9a7a9228577df83027e45ec7de022ea (patch) | |
tree | bd6489fe77ed5fba43adff613293d580fda8e0f3 /js/src/Ice/BasicStream.js | |
parent | Fixed src tree build of IceJS (diff) | |
download | ice-cb4d5772e9a7a9228577df83027e45ec7de022ea.tar.bz2 ice-cb4d5772e9a7a9228577df83027e45ec7de022ea.tar.xz ice-cb4d5772e9a7a9228577df83027e45ec7de022ea.zip |
Fixed ICE-5607: relaxed Ice.MessageSizeMax
Diffstat (limited to 'js/src/Ice/BasicStream.js')
-rw-r--r-- | js/src/Ice/BasicStream.js | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/js/src/Ice/BasicStream.js b/js/src/Ice/BasicStream.js index 1fd7eae3567..3328cc3a727 100644 --- a/js/src/Ice/BasicStream.js +++ b/js/src/Ice/BasicStream.js @@ -1626,7 +1626,7 @@ var WriteEncaps = Class({ }); var BasicStream = Class({ - __init__: function(instance, encoding, unlimited, data) + __init__: function(instance, encoding, data) { this._instance = instance; this._closure = null; @@ -1639,9 +1639,6 @@ var BasicStream = Class({ this._sliceObjects = true; - this._messageSizeMax = this._instance.messageSizeMax(); // Cached for efficiency. - this._unlimited = unlimited !== undefined ? unlimited : false; - this._startSeq = -1; this._sizePos = -1; @@ -1689,7 +1686,7 @@ var BasicStream = Class({ { Debug.assert(this._instance === other._instance); - var tmpBuf, tmpClosure, tmpUnlimited, tmpStartSeq, tmpMinSeqSize, tmpSizePos; + var tmpBuf, tmpClosure, tmpStartSeq, tmpMinSeqSize, tmpSizePos; tmpBuf = other._buf; other._buf = this._buf; @@ -1707,10 +1704,6 @@ var BasicStream = Class({ this.resetEncaps(); other.resetEncaps(); - tmpUnlimited = other._unlimited; - other._unlimited = this._unlimited; - this._unlimited = tmpUnlimited; - tmpStartSeq = other._startSeq; other._startSeq = this._startSeq; this._startSeq = tmpStartSeq; @@ -1730,14 +1723,6 @@ var BasicStream = Class({ }, resize: function(sz) { - // - // Check memory limit if stream is not unlimited. - // - if(!this._unlimited && sz > this._messageSizeMax) - { - ExUtil.throwMemoryLimitException(sz, this._messageSizeMax); - } - this._buf.resize(sz); this._buf.position = sz; }, @@ -2758,10 +2743,6 @@ var BasicStream = Class({ }, expand: function(n) { - if(!this._unlimited && this._buf && this._buf.position + n > this._messageSizeMax) - { - ExUtil.throwMemoryLimitException(this._buf.position + n, this._messageSizeMax); - } this._buf.expand(n); }, createObject: function(id) |