Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
use the full number creation
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-leonov committed Jun 4, 2010
1 parent c92f766 commit 3fac0c5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/classes/Dir.c
Expand Up @@ -247,7 +247,10 @@ walkTree_file_handler(ngx_tree_ctx_t *ctx, ngx_str_t *path)
args[2] = INT_TO_JSVAL(ctx->access);

// bake the file mtime
args[3] = INT_TO_JSVAL(ctx->mtime);
if (!JS_NewNumberValue(cx, ctx->mtime, &args[3]))
{
return NGX_ABORT;
}

// cal the handler and hope for best ;)
if (!JS_CallFunctionValue(cx, js_global, OBJECT_TO_JSVAL(wt_ctx->file), 4, args, &rval))
Expand Down Expand Up @@ -295,7 +298,10 @@ walkTree_pre_tree_handler(ngx_tree_ctx_t *ctx, ngx_str_t *path)
args[1] = INT_TO_JSVAL(ctx->access);

// bake the dir mtime
args[2] = INT_TO_JSVAL(ctx->mtime);
if (!JS_NewNumberValue(cx, ctx->mtime, &args[2]))
{
return NGX_ABORT;
}

// cal the handler and hope for best ;)
if (!JS_CallFunctionValue(cx, js_global, OBJECT_TO_JSVAL(wt_ctx->enter), 3, args, &rval))
Expand Down Expand Up @@ -343,7 +349,10 @@ walkTree_post_tree_handler(ngx_tree_ctx_t *ctx, ngx_str_t *path)
args[1] = INT_TO_JSVAL(ctx->access);

// bake the dir mtime
args[2] = INT_TO_JSVAL(ctx->mtime);
if (!JS_NewNumberValue(cx, ctx->mtime, &args[2]))
{
return NGX_ABORT;
}

// cal the handler and hope for best ;)
if (!JS_CallFunctionValue(cx, js_global, OBJECT_TO_JSVAL(wt_ctx->leave), 3, args, &rval))
Expand Down

0 comments on commit 3fac0c5

Please sign in to comment.