diff options
author | 2023-10-16 21:22:43 -0700 | |
---|---|---|
committer | 2023-10-16 21:22:43 -0700 | |
commit | 98d19fa6244384f7e17998b5420d724481ed3835 (patch) | |
tree | 3061ccab41196daf4194ecc385961b121f2ec06d /src/js/node/tty.js | |
parent | a3958190e8f106adca7fbf4ba2605056cb22aced (diff) | |
download | bun-98d19fa6244384f7e17998b5420d724481ed3835.tar.gz bun-98d19fa6244384f7e17998b5420d724481ed3835.tar.zst bun-98d19fa6244384f7e17998b5420d724481ed3835.zip |
fix(runtime): make some things more stable (partial jsc debug build) (#5881)
* make our debug assertions work
* install bun-webkit-debug
* more progress
* ok
* progress...
* more debug build stuff
* ok
* a
* asdfghjkl
* fix(runtime): fix bad assertion failure in JSBufferList
* ok
* stuff
* upgrade webkit
* Update src/bun.js/bindings/JSDOMWrapperCache.h
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
* fix message for colin's changes
* okay
* fix cjs prototype
* implement mainModule
* i think this fixes it all
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Diffstat (limited to 'src/js/node/tty.js')
-rw-r--r-- | src/js/node/tty.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/js/node/tty.js b/src/js/node/tty.js index 1c3fb2fac..6e138b0cf 100644 --- a/src/js/node/tty.js +++ b/src/js/node/tty.js @@ -1,14 +1,13 @@ const { ttySetMode, isatty, getWindowSize: _getWindowSize } = $lazy("tty"); // primordials -const StringPrototypeSplit = Function.prototype.call.bind(String.prototype.split); const NumberIsInteger = Number.isInteger; function ReadStream(fd) { if (!(this instanceof ReadStream)) return new ReadStream(fd); if (fd >> 0 !== fd || fd < 0) throw new RangeError("fd must be a positive integer"); - const stream = require("node:fs").ReadStream.call(this, "", { + const stream = require("node:fs").ReadStream.$call(this, "", { fd, }); Object.setPrototypeOf(stream, ReadStream.prototype); @@ -103,7 +102,7 @@ function WriteStream(fd) { if (!(this instanceof WriteStream)) return new WriteStream(fd); if (fd >> 0 !== fd || fd < 0) throw new RangeError("fd must be a positive integer"); - const stream = require("node:fs").WriteStream.call(this, "", { + const stream = require("node:fs").WriteStream.$call(this, "", { fd, }); @@ -193,7 +192,7 @@ Object.defineProperty(WriteStream, "prototype", { // Lazy load for startup performance. if (OSRelease === undefined) { const { release } = require("node:os"); - OSRelease = StringPrototypeSplit(release(), "."); + OSRelease = release().split("."); } // Windows 10 build 10586 is the first Windows release that supports 256 // colors. Windows 10 build 14931 is the first release that supports |