Skip to content

Commit

Permalink
chore: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Oct 8, 2023
1 parent e1ea2b0 commit d941639
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "JSICallback.h"
#include "JSIRuntime.h"
#include "Helpers.h"
#include "JSIReadFileCallback.h"

void CanvasJSIModule::install(v8::Isolate *isolate) {

Expand Down Expand Up @@ -49,7 +48,6 @@ void CanvasJSIModule::install(v8::Isolate *isolate) {
v8::FunctionTemplate::New(isolate, &ReadFile)->GetFunction(
context).ToLocalChecked());


canvasMod->Set(context, ConvertToV8String(isolate, "createWebGLContext"),
v8::FunctionTemplate::New(isolate, &CreateWebGLContext)->GetFunction(
context).ToLocalChecked());
Expand Down Expand Up @@ -702,7 +700,7 @@ void CanvasJSIModule::ReadFile(const v8::FunctionCallbackInfo<v8::Value> &args)
// func.call(rt, {std::move(error), jsi::Value::null()});
// }

delete static_cast<JSIReadFileCallback *>(data);
delete static_cast<JSICallback *>(data);
return 0;
}, jsi_callback);

Expand Down Expand Up @@ -762,7 +760,7 @@ void CanvasJSIModule::ReadFile(const v8::FunctionCallbackInfo<v8::Value> &args)
thread.detach();
}

static void CreateWebGLContext(const v8::FunctionCallbackInfo<v8::Value> &args) {
void CanvasJSIModule::CreateWebGLContext(const v8::FunctionCallbackInfo<v8::Value> &args) {
auto configValue = args[0];
auto isolate = args.GetIsolate();
auto context = isolate->GetCurrentContext();
Expand Down Expand Up @@ -954,7 +952,7 @@ static void CreateWebGLContext(const v8::FunctionCallbackInfo<v8::Value> &args)
args.GetReturnValue().SetNull();
}

static void CreateWebGL2Context(const v8::FunctionCallbackInfo<v8::Value> &args) {
void CanvasJSIModule::CreateWebGL2Context(const v8::FunctionCallbackInfo<v8::Value> &args) {
auto configValue = args[0];
auto isolate = args.GetIsolate();
auto context = isolate->GetCurrentContext();
Expand Down

0 comments on commit d941639

Please sign in to comment.