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
|
2018-10-25 02:27:11 +00:00
|
|
|
index fa3a4dd82c0deeaddba0a84e8bf2841e04bc8483..3070f4aa50eed8722805feaf8d9b9db0d68fbbbf 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/include/v8.h
|
|
|
|
+++ b/include/v8.h
|
2018-10-25 02:27:11 +00:00
|
|
|
@@ -7737,6 +7737,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
|
2018-10-25 02:27:11 +00:00
|
|
|
index 809bbe52178a3f8cbcf0b6eb81fba0910c1fb0e6..c1f863d148243d3988a70959fd91a37788137393 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/src/api.cc
|
|
|
|
+++ b/src/api.cc
|
2018-10-25 02:27:11 +00:00
|
|
|
@@ -8107,6 +8107,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);
|
|
|
|
return isolate->context() != nullptr;
|