diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-12-31 16:11:01 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-01-10 16:59:24 +0800 |
commit | 97f59b95675b80a8d8df1d0e9c179c06c0c86a7b (patch) | |
tree | f895a5b2b53b7098f779daf769188a4ba6f4331c /src/node_internals.h | |
parent | fa5af0d50846083fcd0bb9de6006bb57424a17cf (diff) | |
download | android-node-v8-97f59b95675b80a8d8df1d0e9c179c06c0c86a7b.tar.gz android-node-v8-97f59b95675b80a8d8df1d0e9c179c06c0c86a7b.tar.bz2 android-node-v8-97f59b95675b80a8d8df1d0e9c179c06c0c86a7b.zip |
buffer: move initialization of buffer prototype into node.js
Instead of exposing it in `lib/internal/buffer.js` after deleting
it from the binding and then do the initialization in
`lib/buffer.js`, which results in an implicit dependency on
the order in which these modules are loaded.
PR-URL: https://github.com/nodejs/node/pull/25292
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r-- | src/node_internals.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_internals.h b/src/node_internals.h index f9ef31eea5..55e7d565fc 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -246,6 +246,7 @@ v8::MaybeLocal<v8::Uint8Array> New(Environment* env, size_t byte_offset, size_t length) { v8::Local<v8::Uint8Array> ui = v8::Uint8Array::New(ab, byte_offset, length); + CHECK(!env->buffer_prototype_object().IsEmpty()); v8::Maybe<bool> mb = ui->SetPrototype(env->context(), env->buffer_prototype_object()); if (mb.IsNothing()) |