diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-03-04 13:27:39 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-03-14 18:50:15 +0100 |
commit | bea1a386a32afa2879622450549886b0e0bdeead (patch) | |
tree | cf7470fdd1d14c4a906c345b1d58a02d425e17c3 /deps/v8/src | |
parent | cf649c9b0243612d4a75ad99c328c0feaed4c3b9 (diff) | |
download | android-node-v8-bea1a386a32afa2879622450549886b0e0bdeead.tar.gz android-node-v8-bea1a386a32afa2879622450549886b0e0bdeead.tar.bz2 android-node-v8-bea1a386a32afa2879622450549886b0e0bdeead.zip |
deps: V8: cherry-pick d3308d0
Original commit message:
[api] Add `Isolate::GetArrayBufferAllocator()`
This allows non-monolithic embedders to always allocate memory
for ArrayBuffer instances using the right allocation method.
This is based on a patch that Electron is currently using.
Refs: https://github.com/electron/electron/blob/1898f9162073910c05958295c612deec6121a892/patches/common/v8/array_buffer.patch
Change-Id: I39a614343118a0594aab48699a99cc2aad5b7ba9
Reviewed-on: https://chromium-review.googlesource.com/c/1462003
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59697}
Refs: https://github.com/v8/v8/commit/d3308d042c9637958491333831c33335ab9fc734
PR-URL: https://github.com/nodejs/node/pull/25852
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src')
-rw-r--r-- | deps/v8/src/api.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 77e7db3e3f..85306decd7 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -7970,6 +7970,11 @@ void Isolate::SetIdle(bool is_idle) { isolate->SetIdle(is_idle); } +ArrayBuffer::Allocator* Isolate::GetArrayBufferAllocator() { + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); + return isolate->array_buffer_allocator(); +} + bool Isolate::InContext() { i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); return !isolate->context().is_null(); |