| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68accb5 commit 7f08e02
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7717,6 +7717,9 @@ class V8_EXPORT Isolate { | |||
| 7717 | 7717 | */ | |
| 7718 | 7718 | void SetIdle(bool is_idle); | |
| 7719 | 7719 | ||
| 7720 | + /** Returns the ArrayBuffer::Allocator used in this isolate. */ | ||
| 7721 | + ArrayBuffer::Allocator* GetArrayBufferAllocator(); | ||
| 7722 | + | ||
| 7720 | 7723 | /** Returns true if this isolate has a current context. */ | |
| 7721 | 7724 | bool InContext(); | |
| 7722 | 7725 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8084,6 +8084,11 @@ void Isolate::SetIdle(bool is_idle) { | |||
| 8084 | 8084 | isolate->SetIdle(is_idle); | |
| 8085 | 8085 | } | |
| 8086 | 8086 | ||
| 8087 | + ArrayBuffer::Allocator* Isolate::GetArrayBufferAllocator() { | ||
| 8088 | + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | ||
| 8089 | + return isolate->array_buffer_allocator(); | ||
| 8090 | + } | ||
| 8091 | + | ||
| 8087 | 8092 | bool Isolate::InContext() { | |
| 8088 | 8093 | i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | |
| 8089 | 8094 | return isolate->context() != nullptr; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20773,6 +20773,7 @@ TEST(IsolateNewDispose) { | |||
| 20773 | 20773 | CHECK_NOT_NULL(isolate); | |
| 20774 | 20774 | CHECK(current_isolate != isolate); | |
| 20775 | 20775 | CHECK(current_isolate == CcTest::isolate()); | |
| 20776 | + CHECK(isolate->GetArrayBufferAllocator() == CcTest::array_buffer_allocator()); | ||
| 20776 | 20777 | ||
| 20777 | 20778 | isolate->SetFatalErrorHandler(StoringErrorCallback); | |
| 20778 | 20779 | last_location = last_message = nullptr; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments