summaryrefslogtreecommitdiff
path: root/deps/v8/src/api.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-02-19 18:37:58 +0100
committerAnna Henningsen <anna@addaleax.net>2019-02-25 02:00:30 +0100
commit23b075d051acf16711de40cb248bf142ab297d47 (patch)
tree21f04e7dd5610bbe02c6cee103820c5490e4baec /deps/v8/src/api.cc
parentb0869c64d179843575584e88583e5760202e118c (diff)
downloadandroid-node-v8-23b075d051acf16711de40cb248bf142ab297d47.tar.gz
android-node-v8-23b075d051acf16711de40cb248bf142ab297d47.tar.bz2
android-node-v8-23b075d051acf16711de40cb248bf142ab297d47.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/26207 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'deps/v8/src/api.cc')
-rw-r--r--deps/v8/src/api.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc
index 09db471982..40e8b41e69 100644
--- a/deps/v8/src/api.cc
+++ b/deps/v8/src/api.cc
@@ -8007,6 +8007,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() != nullptr;