Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/bb3e0e51f1cbae2134b7891c44a24bccc2f7f255
...commit
http://git.netsurf-browser.org/netsurf.git/commit/bb3e0e51f1cbae2134b7891c44a24bccc2f7f255
...tree
http://git.netsurf-browser.org/netsurf.git/tree/bb3e0e51f1cbae2134b7891c44a24bccc2f7f255
The branch, master has been updated
via bb3e0e51f1cbae2134b7891c44a24bccc2f7f255 (commit)
from 7f612548e747d60f65d8f331ba68dbd00191a16a (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=bb3e0e51f1cbae2134b7891c44a24bccc2f7f255
commit bb3e0e51f1cbae2134b7891c44a24bccc2f7f255
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
dukky: Attempt to make the fallback to HTMLUnknownElement more useful.
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index 538a15b..491c5c2 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -68,17 +68,20 @@ static duk_ret_t dukky_populate_object(duk_context *ctx,
void *udata)
/* ... obj args protoname */
duk_get_global_string(ctx, PROTO_MAGIC);
/* .. obj args protoname prototab */
- duk_insert(ctx, -2);
- /* ... obj args prototab protoname */
+ duk_dup(ctx, -2);
+ /* ... obj args protoname prototab protoname */
duk_get_prop(ctx, -2);
- /* ... obj args prototab {proto/undefined} */
+ /* ... obj args protoname prototab {proto/undefined} */
if (duk_is_undefined(ctx, -1)) {
NSLOG(dukky, WARNING,
- "RuhRoh, couldn't find a prototype, HTMLUnknownElement it
is");
+ "Unable to find dukky prototype for `%s` - falling back
to HTMLUnknownElement",
+ duk_get_string(ctx, -3) + 2 /* Skip the two unprintables
*/);
duk_pop(ctx);
duk_push_string(ctx, PROTO_NAME(HTMLUNKNOWNELEMENT));
duk_get_prop(ctx, -2);
}
+ /* ... obj args protoname prototab proto */
+ duk_remove(ctx, -3);
/* ... obj args prototab proto */
duk_dup(ctx, -1);
/* ... obj args prototab proto proto */
-----------------------------------------------------------------------
Summary of changes:
content/handlers/javascript/duktape/dukky.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index 538a15b..491c5c2 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -68,17 +68,20 @@ static duk_ret_t dukky_populate_object(duk_context *ctx,
void *udata)
/* ... obj args protoname */
duk_get_global_string(ctx, PROTO_MAGIC);
/* .. obj args protoname prototab */
- duk_insert(ctx, -2);
- /* ... obj args prototab protoname */
+ duk_dup(ctx, -2);
+ /* ... obj args protoname prototab protoname */
duk_get_prop(ctx, -2);
- /* ... obj args prototab {proto/undefined} */
+ /* ... obj args protoname prototab {proto/undefined} */
if (duk_is_undefined(ctx, -1)) {
NSLOG(dukky, WARNING,
- "RuhRoh, couldn't find a prototype, HTMLUnknownElement it
is");
+ "Unable to find dukky prototype for `%s` - falling back
to HTMLUnknownElement",
+ duk_get_string(ctx, -3) + 2 /* Skip the two unprintables
*/);
duk_pop(ctx);
duk_push_string(ctx, PROTO_NAME(HTMLUNKNOWNELEMENT));
duk_get_prop(ctx, -2);
}
+ /* ... obj args protoname prototab proto */
+ duk_remove(ctx, -3);
/* ... obj args prototab proto */
duk_dup(ctx, -1);
/* ... obj args prototab proto proto */
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org