MCPcopy Create free account
hub / github.com/Tencent/puerts / PushArrayBufferForJSFunction

Function PushArrayBufferForJSFunction

unity/native_src/Src/Puerts.cpp:584–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584V8_EXPORT void PushArrayBufferForJSFunction(JSFunction *Function, unsigned char * Bytes, int Length)
585{
586 auto Isolate = Function->ResultInfo.Isolate;
587 v8::Isolate::Scope IsolateScope(Isolate);
588 v8::HandleScope HandleScope(Isolate);
589 v8::Local<v8::Context> Context = Function->ResultInfo.Context.Get(Isolate);
590 v8::Context::Scope ContextScope(Context);
591 FValue Value;
592 Value.Type = puerts::ArrayBuffer;
593 Value.ArrayBuffer.Reset(Isolate, puerts::NewArrayBuffer(Isolate, Bytes, Length));
594 Function->Arguments.push_back(std::move(Value));
595}
596
597V8_EXPORT void PushStringForJSFunction(JSFunction *Function, const char* S)
598{

Callers

nothing calls this directly

Calls 3

NewArrayBufferFunction · 0.85
GetMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected