-
-
Save anonymous/3b4707b5611a110a0067f71ebdaff9f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 if (!process_emit.IsEmpty()) | |
97 { | |
98 printf("Getting isolate\n"); | |
99 Isolate *isolate = Isolate::GetCurrent(); | |
100 printf("Creating a local copy of process.emit()\n"); | |
101 Local<Function> lpe = Local<Function>::New(isolate, process_emit); | |
102 printf("Creating the arguments for process.emit()\n"); | |
103 Local<Value> args[2] = { | |
104 args[0] = Local<Value>::New( | |
105 isolate, String::NewFromUtf8(isolate, "test")), | |
106 args[1] = Local<Value>::New( | |
107 isolate, Number::New(isolate, 0)) | |
108 }; | |
109 printf("Calling process.emit()\n"); | |
110 lpe->Call(isolate->GetCurrentContext()->Global(), 2, NULL); | |
111 return 0; | |
112 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment