d56617e5d0
* chore: avoid appending git version to the exported patches * fix no-eol at end of v8 patch
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
Date: Mon, 22 Oct 2018 10:47:12 -0700
|
|
Subject: array_buffer.patch
|
|
|
|
|
|
diff --git a/include/v8.h b/include/v8.h
|
|
index 6bba7a177e72b54084b2a52e413c5de6edb26b01..b1e192dc009b33484148817be0b0b6bb4dc1bf4b 100644
|
|
--- a/include/v8.h
|
|
+++ b/include/v8.h
|
|
@@ -7766,6 +7766,9 @@ class V8_EXPORT Isolate {
|
|
*/
|
|
void SetIdle(bool is_idle);
|
|
|
|
+ /** Returns the ArrayBuffer::Allocator used in this isolate. */
|
|
+ ArrayBuffer::Allocator* GetArrayBufferAllocator();
|
|
+
|
|
/** Returns true if this isolate has a current context. */
|
|
bool InContext();
|
|
|
|
diff --git a/src/api.cc b/src/api.cc
|
|
index 9fe5268aa5e615fee058d430b6a137dd40fc9226..5c1f2410bbab4a0d9f4fcd99f19530ba999a66a2 100644
|
|
--- a/src/api.cc
|
|
+++ b/src/api.cc
|
|
@@ -8290,6 +8290,13 @@ 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;
|