diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/library.js | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -78,4 +78,5 @@ a license to everyone to use it as detailed in LICENSE.) * James Gregory <jgregory@zynga.com> (copyright owned by Zynga, Inc) * Dan Gohman <sunfish@google.com> (copyright owned by Google, Inc.) * Jeff Gilbert <jgilbert@mozilla.com> (copyright owned by Mozilla Foundation) +* Marc Feeley <mfeeley@mozilla.com> (copyright owned by Mozilla Foundation) diff --git a/src/library.js b/src/library.js index 51c4c5cb..58a4e598 100644 --- a/src/library.js +++ b/src/library.js @@ -1805,6 +1805,10 @@ LibraryManager.library = { ___setErrNo(ERRNO_CODES.EIO); return -1; } + if (result === undefined && bytesRead === 0) { + ___setErrNo(ERRNO_CODES.EAGAIN); + return -1; + } if (result === null || result === undefined) break; bytesRead++; {{{ makeSetValue('buf', 'i', 'result', 'i8') }}} |