Update common/v8/array_buffer.patch

This commit is contained in:
Aleksei Kuzmin 2018-07-18 10:55:31 +02:00
Родитель 78cf9b7541
Коммит 10670b515c
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -1,10 +1,10 @@
diff --git a/include/v8.h b/include/v8.h
index 277cbd442a..49c9f7c9a6 100644
index 573e80176d..80bfd1d22a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -7281,6 +7281,9 @@ class V8_EXPORT Isolate {
V8_DEPRECATED("CpuProfiler should be created with CpuProfiler::New call.",
CpuProfiler* GetCpuProfiler());
@@ -7337,6 +7337,9 @@ class V8_EXPORT Isolate {
*/
void SetIdle(bool is_idle);
+ /** Returns the ArrayBuffer::Allocator used in this isolate. */
+ ArrayBuffer::Allocator* GetArrayBufferAllocator();
@ -13,13 +13,14 @@ index 277cbd442a..49c9f7c9a6 100644
bool InContext();
diff --git a/src/api.cc b/src/api.cc
index 8531cd5c05..fc0d96c74a 100644
index 8b177d041d..f58a350f0f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8076,6 +8076,12 @@ CpuProfiler* Isolate::GetCpuProfiler() {
@@ -8139,6 +8139,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();