is there any way to get uint8Array data with cefv8value?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

is there any way to get uint8Array data with cefv8value?

Postby colinChan008 » Thu Sep 23, 2021 6:24 am

as tile, except scheme .I want to get the memory pointer directly just something like "(uint8_t*)target->Buffer()->GetBackingStore()->Data()" in v8.
colinChan008
Techie
 
Posts: 12
Joined: Thu Sep 16, 2021 3:27 am

Re: is there any way to get uint8Array data with cefv8value?

Postby magreenblatt » Thu Sep 23, 2021 7:14 am

You can create an array backed by a native buffer with CefV8Value::CreateArrayBuffer.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: is there any way to get uint8Array data with cefv8value?

Postby colinChan008 » Thu Sep 23, 2021 7:22 am

If I want to get the buffer'pointer of original v8 Arraybuffer, how to do it.
colinChan008
Techie
 
Posts: 12
Joined: Thu Sep 16, 2021 3:27 am

Re: is there any way to get uint8Array data with cefv8value?

Postby magreenblatt » Thu Sep 23, 2021 7:28 am

colinChan008 wrote:If I want to get the buffer'pointer of original v8 Arraybuffer, how to do it.

Getting the pointer is not supported. You would need to read the data out in JavaScript and then submit the data to native code via some other mechanism.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 36 guests