| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 34a92d1 commit 8a79636
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2780,7 +2780,7 @@ napi_status NAPI_CDECL napi_create_arraybuffer(napi_env env, | |||
| 2780 | 2780 | // Optionally return a pointer to the buffer's data, to avoid another call to | |
| 2781 | 2781 | // retrieve it. | |
| 2782 | 2782 | if (data != nullptr) { | |
| 2783 | - *data = buffer->GetBackingStore()->Data(); | ||
| 2783 | + *data = buffer->Data(); | ||
| 2784 | 2784 | } | |
| 2785 | 2785 | ||
| 2786 | 2786 | *result = v8impl::JsValueFromV8LocalValue(buffer); | |
@@ -2814,15 +2814,14 @@ napi_status NAPI_CDECL napi_get_arraybuffer_info(napi_env env, | |||
| 2814 | 2814 | v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(arraybuffer); | |
| 2815 | 2815 | RETURN_STATUS_IF_FALSE(env, value->IsArrayBuffer(), napi_invalid_arg); | |
| 2816 | 2816 | ||
| 2817 | - std::shared_ptr<v8::BackingStore> backing_store = | ||
| 2818 | - value.As<v8::ArrayBuffer>()->GetBackingStore(); | ||
| 2817 | + v8::Local<v8::ArrayBuffer> ab = value.As<v8::ArrayBuffer>(); | ||
| 2819 | 2818 | ||
| 2820 | 2819 | if (data != nullptr) { | |
| 2821 | - *data = backing_store->Data(); | ||
| 2820 | + *data = ab->Data(); | ||
| 2822 | 2821 | } | |
| 2823 | 2822 | ||
| 2824 | 2823 | if (byte_length != nullptr) { | |
| 2825 | - *byte_length = backing_store->ByteLength(); | ||
| 2824 | + *byte_length = ab->ByteLength(); | ||
| 2826 | 2825 | } | |
| 2827 | 2826 | ||
| 2828 | 2827 | return napi_clear_last_error(env); | |
@@ -2963,8 +2962,7 @@ napi_status NAPI_CDECL napi_get_typedarray_info(napi_env env, | |||
| 2963 | 2962 | } | |
| 2964 | 2963 | ||
| 2965 | 2964 | if (data != nullptr) { | |
| 2966 | - *data = static_cast<uint8_t*>(buffer->GetBackingStore()->Data()) + | ||
| 2967 | - array->ByteOffset(); | ||
| 2965 | + *data = static_cast<uint8_t*>(buffer->Data()) + array->ByteOffset(); | ||
| 2968 | 2966 | } | |
| 2969 | 2967 | ||
| 2970 | 2968 | if (arraybuffer != nullptr) { | |
@@ -3044,8 +3042,7 @@ napi_status NAPI_CDECL napi_get_dataview_info(napi_env env, | |||
| 3044 | 3042 | } | |
| 3045 | 3043 | ||
| 3046 | 3044 | if (data != nullptr) { | |
| 3047 | - *data = static_cast<uint8_t*>(buffer->GetBackingStore()->Data()) + | ||
| 3048 | - array->ByteOffset(); | ||
| 3045 | + *data = static_cast<uint8_t*>(buffer->Data()) + array->ByteOffset(); | ||
| 3049 | 3046 | } | |
| 3050 | 3047 | ||
| 3051 | 3048 | if (arraybuffer != nullptr) { | |
@@ -3255,8 +3252,8 @@ napi_status NAPI_CDECL napi_is_detached_arraybuffer(napi_env env, | |||
| 3255 | 3252 | ||
| 3256 | 3253 | v8::Local<v8::Value> value = v8impl::V8LocalValueFromJsValue(arraybuffer); | |
| 3257 | 3254 | ||
| 3258 | - *result = value->IsArrayBuffer() && | ||
| 3259 | - value.As<v8::ArrayBuffer>()->GetBackingStore()->Data() == nullptr; | ||
| 3255 | + *result = | ||
| 3256 | + value->IsArrayBuffer() && value.As<v8::ArrayBuffer>()->Data() == nullptr; | ||
| 3260 | 3257 | ||
| 3261 | 3258 | return napi_clear_last_error(env); | |
| 3262 | 3259 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments