2018-10-24 18:24:11 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/include/v8.h b/include/v8.h
|
2019-02-04 05:49:22 +00:00
|
|
|
index fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce..f23567c1429ae0bbc5f916e4ee0a1190dae8d88f 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/include/v8.h
|
|
|
|
+++ b/include/v8.h
|
2019-02-04 05:49:22 +00:00
|
|
|
@@ -7707,6 +7707,9 @@ class V8_EXPORT Isolate {
|
2018-09-14 05:02:16 +00:00
|
|
|
*/
|
|
|
|
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
|
2019-02-10 12:28:46 +00:00
|
|
|
index 59527269d2dec81e02089ebc926e74893ea7827f..4000a95a2e52aad0e9f6110a5c53c5ea1db82645 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/src/api.cc
|
|
|
|
+++ b/src/api.cc
|
2019-01-16 18:09:10 +00:00
|
|
|
@@ -7966,6 +7966,13 @@ void Isolate::SetIdle(bool is_idle) {
|
2018-09-14 05:02:16 +00:00
|
|
|
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);
|
2019-01-09 00:53:35 +00:00
|
|
|
return !isolate->context().is_null();
|