Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/d68e2c879c9254cae1ea8...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/d68e2c879c9254cae1ea8e2...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/d68e2c879c9254cae1ea8e248...
The branch, dsilvers/dukky has been updated
via d68e2c879c9254cae1ea8e248ebe70ddf5e797e6 (commit)
via 72e917b084ff9d63aa32d72edb8e04be1e3e8a12 (commit)
via 8e20e88f7a977204fb6c085de4a1364ade825073 (commit)
from 4e125c6e82444e5e4a08dbbe1a910551eb5b6f41 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=d68e2c879c9254cae1e...
commit d68e2c879c9254cae1ea8e248ebe70ddf5e797e6
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Handle node delete so we don't assert
diff --git a/render/html.c b/render/html.c
index c2d26f7..30b01cb 100644
--- a/render/html.c
+++ b/render/html.c
@@ -730,6 +730,21 @@ html_document_user_data_handler(dom_node_operation operation,
}
switch (operation) {
+ case DOM_NODE_CLONED:
+ LOG("Cloned");
+ break;
+ case DOM_NODE_RENAMED:
+ LOG("Renamed");
+ break;
+ case DOM_NODE_IMPORTED:
+ LOG("imported");
+ break;
+ case DOM_NODE_ADOPTED:
+ LOG("Adopted");
+ break;
+ case DOM_NODE_DELETED:
+ /* This is the only path I expect */
+ break;
default:
LOG("User data operation not handled.");
assert(0);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=72e917b084ff9d63aa3...
commit 72e917b084ff9d63aa32d72edb8e04be1e3e8a12
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Fix silly mistake in DUKKY_GET_PROTOTYPE
diff --git a/javascript/dukky.h b/javascript/dukky.h
index cd6286c..5e81d68 100644
--- a/javascript/dukky.h
+++ b/javascript/dukky.h
@@ -34,9 +34,9 @@ static inline void *dukky_get_private(duk_context *ctx, int idx)
duk_put_prop_string(ctx, 0, PRIVATE_MAGIC)
#define DUKKY_SET_DESTRUCTOR(idx,n) \
- duk_dup(ctx, idx); \
+ duk_dup(ctx, idx); \
duk_push_c_function(ctx, DUKKY_FUNC_T(n,__destructor), 1); \
- duk_set_finalizer(ctx, -2); \
+ duk_set_finalizer(ctx, -2); \
duk_pop(ctx);
#define DUKKY_SET_CONSTRUCTOR(idx,n,a) \
@@ -57,11 +57,10 @@ static inline void *dukky_get_private(duk_context *ctx, int idx)
duk_pop_2(ctx); \
if (priv == NULL) return 0; /* No can do */
-#define DUKKY_GET_PROTOTYPE(klass) \
+#define DUKKY_GET_PROTOTYPE(klass) \
duk_get_global_string(ctx, PROTO_MAGIC); \
duk_get_prop_string(ctx, -1, PROTO_NAME(klass)); \
- duk_replace(ctx, -2); \
- duk_pop(ctx);
+ duk_replace(ctx, -2)
#define DUKKY_DECLARE_PROTOTYPE(klass) \
DUKKY_FUNC(klass,__proto)
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=8e20e88f7a977204fb6...
commit 8e20e88f7a977204fb6c085de4a1364ade825073
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
A little debug help
diff --git a/javascript/dukky.c b/javascript/dukky.c
index 2d744ce..1f9123b 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);
-----------------------------------------------------------------------
Summary of changes:
javascript/dukky.c | 3 +++
javascript/dukky.h | 9 ++++-----
render/html.c | 15 +++++++++++++++
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/javascript/dukky.c b/javascript/dukky.c
index 2d744ce..1f9123b 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);
diff --git a/javascript/dukky.h b/javascript/dukky.h
index cd6286c..5e81d68 100644
--- a/javascript/dukky.h
+++ b/javascript/dukky.h
@@ -34,9 +34,9 @@ static inline void *dukky_get_private(duk_context *ctx, int idx)
duk_put_prop_string(ctx, 0, PRIVATE_MAGIC)
#define DUKKY_SET_DESTRUCTOR(idx,n) \
- duk_dup(ctx, idx); \
+ duk_dup(ctx, idx); \
duk_push_c_function(ctx, DUKKY_FUNC_T(n,__destructor), 1); \
- duk_set_finalizer(ctx, -2); \
+ duk_set_finalizer(ctx, -2); \
duk_pop(ctx);
#define DUKKY_SET_CONSTRUCTOR(idx,n,a) \
@@ -57,11 +57,10 @@ static inline void *dukky_get_private(duk_context *ctx, int idx)
duk_pop_2(ctx); \
if (priv == NULL) return 0; /* No can do */
-#define DUKKY_GET_PROTOTYPE(klass) \
+#define DUKKY_GET_PROTOTYPE(klass) \
duk_get_global_string(ctx, PROTO_MAGIC); \
duk_get_prop_string(ctx, -1, PROTO_NAME(klass)); \
- duk_replace(ctx, -2); \
- duk_pop(ctx);
+ duk_replace(ctx, -2)
#define DUKKY_DECLARE_PROTOTYPE(klass) \
DUKKY_FUNC(klass,__proto)
diff --git a/render/html.c b/render/html.c
index c2d26f7..30b01cb 100644
--- a/render/html.c
+++ b/render/html.c
@@ -730,6 +730,21 @@ html_document_user_data_handler(dom_node_operation operation,
}
switch (operation) {
+ case DOM_NODE_CLONED:
+ LOG("Cloned");
+ break;
+ case DOM_NODE_RENAMED:
+ LOG("Renamed");
+ break;
+ case DOM_NODE_IMPORTED:
+ LOG("imported");
+ break;
+ case DOM_NODE_ADOPTED:
+ LOG("Adopted");
+ break;
+ case DOM_NODE_DELETED:
+ /* This is the only path I expect */
+ break;
default:
LOG("User data operation not handled.");
assert(0);
--
NetSurf Browser