diff options
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h index f2d3f355f9f..2f6c17fc321 100644 --- a/src/util.h +++ b/src/util.h @@ -488,11 +488,12 @@ class BufferValue : public MaybeStackBuffer<char> { #define SPREAD_BUFFER_ARG(val, name) \ CHECK((val)->IsArrayBufferView()); \ v8::Local<v8::ArrayBufferView> name = (val).As<v8::ArrayBufferView>(); \ - v8::ArrayBuffer::Contents name##_c = name->Buffer()->GetContents(); \ + std::shared_ptr<v8::BackingStore> name##_bs = \ + name->Buffer()->GetBackingStore(); \ const size_t name##_offset = name->ByteOffset(); \ const size_t name##_length = name->ByteLength(); \ char* const name##_data = \ - static_cast<char*>(name##_c.Data()) + name##_offset; \ + static_cast<char*>(name##_bs->Data()) + name##_offset; \ if (name##_length > 0) \ CHECK_NE(name##_data, nullptr); |