Created
November 9, 2011 19:49
-
-
Save mraleph/1352731 to your computer and use it in GitHub Desktop.
catching memory corruption
This file contains hidden or 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 Handle<Value> Stat(const Arguments& args) { | |
HandleScope scope; | |
if (args.Length() < 1 || !args[0]->IsString()) { | |
return THROW_BAD_ARGS; | |
} | |
String::Utf8Value path(args[0]->ToString()); | |
if (args[1]->IsFunction()) { | |
ASYNC_CALL(stat, args[1], *path) | |
} else { | |
printf("isolate_ before call to uv: %p\n", *((void**)&scope)); | |
SYNC_CALL(stat, *path, *path) | |
printf("isolate_ after call to uv: %p\n", *((void**)&scope)); | |
return scope.Close(BuildStatsObject((NODE_STAT_STRUCT*)SYNC_REQ.ptr)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
isolate_ before call to uv: 0x101026800
isolate_ after call to uv: 0x0