diff options
author | Sebastien Ahkrin <sebastien48criquet@gmail.com> | 2020-01-06 03:32:21 +0100 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-01-08 06:10:11 -0800 |
commit | 607be0c78a6bd33a105d2a690f6e71264016252c (patch) | |
tree | ab1ab55592a70ed567aed5f7d326a96293bf91f8 /lib/_stream_writable.js | |
parent | bd6d6512f02d6fa10a0484577c270bb44f1b750b (diff) | |
download | node-new-607be0c78a6bd33a105d2a690f6e71264016252c.tar.gz |
stream: replace Function.prototype with primordial
PR-URL: https://github.com/nodejs/node/pull/31204
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'lib/_stream_writable.js')
-rw-r--r-- | lib/_stream_writable.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 8d427f1afe..3f02988370 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -27,6 +27,7 @@ const { Array, + FunctionPrototype, ObjectDefineProperty, ObjectSetPrototypeOf, Symbol, @@ -205,7 +206,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer', { // whose prototype chain only points to Readable. var realHasInstance; if (typeof Symbol === 'function' && SymbolHasInstance) { - realHasInstance = Function.prototype[SymbolHasInstance]; + realHasInstance = FunctionPrototype[SymbolHasInstance]; ObjectDefineProperty(Writable, SymbolHasInstance, { value: function(object) { if (realHasInstance.call(this, object)) |