Created
November 22, 2010 02:32
-
-
Save pagameba/709438 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
static int EIO_AfterDrawMap(eio_req *req) { | |
HandleScope scope; | |
drawmap_request *baton =(drawmap_request *)req->data; | |
ev_unref(EV_DEFAULT_UC); | |
baton->map->Unref(); | |
Local<Value> argv[1]; | |
Buffer * buffer = Buffer::New(baton->data, baton->size, FreeImageBuffer, NULL); | |
argv[0] = buffer; | |
TryCatch try_catch; | |
baton->cb->Call(Context::GetCurrent()->Global(), 1, argv); | |
if (try_catch.HasCaught()) { | |
FatalException(try_catch); | |
} | |
baton->cb.Dispose(); | |
delete baton; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment