diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2015-07-19 09:11:21 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2015-07-19 09:11:21 +0100 |
commit | 8e20e88f7a977204fb6c085de4a1364ade825073 (patch) | |
tree | 236ba0f5263d93620d4b19a19ab5e0b9fb8e2e3c /javascript/dukky.c | |
parent | 4e125c6e82444e5e4a08dbbe1a910551eb5b6f41 (diff) | |
download | netsurf-8e20e88f7a977204fb6c085de4a1364ade825073.tar.gz netsurf-8e20e88f7a977204fb6c085de4a1364ade825073.tar.bz2 |
A little debug help
Diffstat (limited to 'javascript/dukky.c')
-rw-r--r-- | javascript/dukky.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/javascript/dukky.c b/javascript/dukky.c index 2d744cedd..1f9123b2a 100644 --- a/javascript/dukky.c +++ b/javascript/dukky.c @@ -92,6 +92,7 @@ static duk_ret_t dukky_create_prototype(duk_context *ctx, duk_push_object(ctx); if ((ret = duk_safe_call(ctx, genproto, 1, 1)) != DUK_EXEC_SUCCESS) { duk_pop(ctx); + LOG("Failed to register prototype for %s", proto_name + 2); return ret; } /* top of stack is the ready prototype, inject it */ @@ -132,6 +133,8 @@ jscontext *js_newcontext(int timeout, jscallback *cb, void *cbctx) if (ret->ctx == NULL) { free(ret); return NULL; } /* Create the prototype stuffs */ duk_push_global_object(ctx); + duk_push_boolean(ctx, true); + duk_put_prop_string(ctx, -2, "protos"); duk_put_global_string(ctx, PROTO_MAGIC); /* Create prototypes here? */ DUKKY_NEW_PROTOTYPE(event_target); |