1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[ecmascript] Added some debug statements

This commit is contained in:
Witold Filipczyk 2021-08-19 18:56:50 +02:00
parent 50089fb463
commit 4121b163c1
11 changed files with 702 additions and 0 deletions

View File

@ -16,6 +16,12 @@
#include "main/module.h" #include "main/module.h"
#include "util/time.h" #include "util/time.h"
//#define ECMASCRIPT_DEBUG 1
#ifdef ECMASCRIPT_DEBUG
#include <stdio.h>
#endif
struct form_state; struct form_state;
struct form_view; struct form_view;
struct string; struct string;

View File

@ -56,6 +56,10 @@ const JSPropertySpec console_props[] = {
static bool static bool
console_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) console_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *parent_win; /* instance of @window_class */ JSObject *parent_win; /* instance of @window_class */
struct view_state *vs; struct view_state *vs;
struct document_view *doc_view; struct document_view *doc_view;
@ -75,6 +79,9 @@ const spidermonkeyFunctionSpec console_funcs[] = {
static bool static bool
console_log(JSContext *ctx, unsigned int argc, JS::Value *vp) console_log(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct ecmascript_interpreter *interpreter = JS_GetContextPrivate(ctx); struct ecmascript_interpreter *interpreter = JS_GetContextPrivate(ctx);
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);

View File

@ -78,6 +78,10 @@ JSClass document_class = {
static bool static bool
document_get_property_anchors(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_anchors(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -121,6 +125,9 @@ document_get_property_anchors(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_baseURI(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_baseURI(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -159,6 +166,9 @@ document_get_property_baseURI(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_body(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_body(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -202,6 +212,9 @@ document_get_property_body(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_set_property_body(JSContext *ctx, unsigned int argc, JS::Value *vp) document_set_property_body(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
return true; return true;
} }
@ -209,6 +222,9 @@ document_set_property_body(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_cookie(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_cookie(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -246,6 +262,9 @@ document_get_property_cookie(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_set_property_cookie(JSContext *ctx, unsigned int argc, JS::Value *vp) document_set_property_cookie(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -274,6 +293,9 @@ document_set_property_cookie(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_charset(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_charset(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -305,6 +327,9 @@ document_get_property_charset(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_doctype(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_doctype(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -342,6 +367,9 @@ document_get_property_doctype(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_documentElement(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_documentElement(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -385,6 +413,9 @@ document_get_property_documentElement(JSContext *ctx, unsigned int argc, JS::Val
static bool static bool
document_get_property_documentURI(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_documentURI(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -423,6 +454,9 @@ document_get_property_documentURI(JSContext *ctx, unsigned int argc, JS::Value *
static bool static bool
document_get_property_domain(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_domain(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -461,6 +495,9 @@ document_get_property_domain(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_forms(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_forms(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -503,6 +540,9 @@ document_get_property_forms(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_head(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_head(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -545,6 +585,9 @@ document_get_property_head(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_images(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_images(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -587,6 +630,9 @@ document_get_property_images(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_links(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_links(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -629,6 +675,9 @@ document_get_property_links(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_location(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_location(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
JS::RootedObject parent_win(ctx, js::GetGlobalForObjectCrossCompartment(hobj)); JS::RootedObject parent_win(ctx, js::GetGlobalForObjectCrossCompartment(hobj));
@ -650,6 +699,9 @@ document_get_property_location(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_nodeType(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_nodeType(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -667,6 +719,9 @@ document_get_property_nodeType(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_set_property_location(JSContext *ctx, unsigned int argc, JS::Value *vp) document_set_property_location(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -696,6 +751,9 @@ document_set_property_location(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_referrer(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_referrer(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -763,6 +821,9 @@ document_get_property_referrer(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_scripts(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_scripts(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -807,6 +868,9 @@ document_get_property_scripts(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_get_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -836,6 +900,9 @@ document_get_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_set_property_title(JSContext *ctx, int argc, JS::Value *vp) document_set_property_title(JSContext *ctx, int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -869,6 +936,9 @@ document_set_property_title(JSContext *ctx, int argc, JS::Value *vp)
static bool static bool
document_get_property_url(JSContext *ctx, unsigned int argc, JS::Value *vp) document_get_property_url(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -905,6 +975,9 @@ document_get_property_url(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_set_property_url(JSContext *ctx, int argc, JS::Value *vp) document_set_property_url(JSContext *ctx, int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -965,6 +1038,9 @@ JSPropertySpec document_props[] = {
static bool static bool
document_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) document_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::RootedObject parent_win(ctx); /* instance of @window_class */ JS::RootedObject parent_win(ctx); /* instance of @window_class */
struct view_state *vs; struct view_state *vs;
struct document_view *doc_view; struct document_view *doc_view;
@ -1033,6 +1109,9 @@ const spidermonkeyFunctionSpec document_funcs[] = {
static bool static bool
document_write_do(JSContext *ctx, unsigned int argc, JS::Value *rval, int newline) document_write_do(JSContext *ctx, unsigned int argc, JS::Value *rval, int newline)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -1102,6 +1181,9 @@ document_write_do(JSContext *ctx, unsigned int argc, JS::Value *rval, int newlin
static bool static bool
document_write(JSContext *ctx, unsigned int argc, JS::Value *rval) document_write(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
return document_write_do(ctx, argc, rval, 0); return document_write_do(ctx, argc, rval, 0);
} }
@ -1110,6 +1192,9 @@ document_write(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
document_writeln(JSContext *ctx, unsigned int argc, JS::Value *rval) document_writeln(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
return document_write_do(ctx, argc, rval, 1); return document_write_do(ctx, argc, rval, 1);
} }
@ -1117,6 +1202,9 @@ document_writeln(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp) document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
struct ecmascript_interpreter *interpreter = JS_GetCompartmentPrivate(comp); struct ecmascript_interpreter *interpreter = JS_GetCompartmentPrivate(comp);
@ -1210,6 +1298,9 @@ document_parse(struct document *document)
static bool static bool
document_createComment(JSContext *ctx, unsigned int argc, JS::Value *vp) document_createComment(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1256,6 +1347,9 @@ document_createComment(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_createElement(JSContext *ctx, unsigned int argc, JS::Value *vp) document_createElement(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1302,6 +1396,9 @@ document_createElement(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_createTextNode(JSContext *ctx, unsigned int argc, JS::Value *vp) document_createTextNode(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1348,6 +1445,9 @@ document_createTextNode(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_getElementById(JSContext *ctx, unsigned int argc, JS::Value *vp) document_getElementById(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1407,6 +1507,9 @@ document_getElementById(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_getElementsByClassName(JSContext *ctx, unsigned int argc, JS::Value *vp) document_getElementsByClassName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1466,6 +1569,9 @@ document_getElementsByClassName(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
document_getElementsByName(JSContext *ctx, unsigned int argc, JS::Value *vp) document_getElementsByName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1527,6 +1633,9 @@ document_getElementsByName(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
document_getElementsByTagName(JSContext *ctx, unsigned int argc, JS::Value *vp) document_getElementsByTagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (argc != 1) { if (argc != 1) {
@ -1598,6 +1707,9 @@ JSClass doctype_class = {
static bool static bool
doctype_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp) doctype_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -1630,6 +1742,9 @@ doctype_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
doctype_get_property_publicId(JSContext *ctx, unsigned int argc, JS::Value *vp) doctype_get_property_publicId(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -1662,6 +1777,9 @@ doctype_get_property_publicId(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
doctype_get_property_systemId(JSContext *ctx, unsigned int argc, JS::Value *vp) doctype_get_property_systemId(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -1701,6 +1819,9 @@ JSPropertySpec doctype_props[] = {
static JSObject * static JSObject *
getDoctype(JSContext *ctx, void *node) getDoctype(JSContext *ctx, void *node)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *el = JS_NewObject(ctx, &doctype_class); JSObject *el = JS_NewObject(ctx, &doctype_class);
if (!el) { if (!el) {

View File

@ -139,6 +139,10 @@ JSPropertySpec element_props[] = {
static bool static bool
element_get_property_attributes(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_attributes(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -186,6 +190,9 @@ element_get_property_attributes(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
element_get_property_children(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_children(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -249,6 +256,9 @@ element_get_property_children(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_childElementCount(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_childElementCount(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -287,6 +297,9 @@ element_get_property_childElementCount(JSContext *ctx, unsigned int argc, JS::Va
static bool static bool
element_get_property_childNodes(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_childNodes(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -335,6 +348,9 @@ element_get_property_childNodes(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
element_get_property_className(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_className(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -375,6 +391,9 @@ element_get_property_className(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_dir(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_dir(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -418,6 +437,9 @@ element_get_property_dir(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_firstChild(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_firstChild(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -464,6 +486,9 @@ element_get_property_firstChild(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
element_get_property_firstElementChild(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_firstElementChild(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -519,6 +544,9 @@ element_get_property_firstElementChild(JSContext *ctx, unsigned int argc, JS::Va
static bool static bool
element_get_property_id(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_id(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -558,6 +586,9 @@ element_get_property_id(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_lang(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_lang(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -597,6 +628,9 @@ element_get_property_lang(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_lastChild(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_lastChild(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -642,6 +676,9 @@ element_get_property_lastChild(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_lastElementChild(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_lastElementChild(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -697,6 +734,9 @@ element_get_property_lastElementChild(JSContext *ctx, unsigned int argc, JS::Val
static bool static bool
element_get_property_nextElementSibling(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_nextElementSibling(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -752,6 +792,9 @@ element_get_property_nextElementSibling(JSContext *ctx, unsigned int argc, JS::V
static bool static bool
element_get_property_nodeName(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_nodeName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -807,6 +850,9 @@ element_get_property_nodeName(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_nodeType(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_nodeType(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -856,6 +902,9 @@ element_get_property_nodeType(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_nodeValue(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_nodeValue(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -922,6 +971,9 @@ element_get_property_nodeValue(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_nextSibling(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_nextSibling(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -968,6 +1020,9 @@ element_get_property_nextSibling(JSContext *ctx, unsigned int argc, JS::Value *v
static bool static bool
element_get_property_ownerDocument(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_ownerDocument(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -998,6 +1053,9 @@ element_get_property_ownerDocument(JSContext *ctx, unsigned int argc, JS::Value
static bool static bool
element_get_property_parentElement(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_parentElement(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1044,6 +1102,9 @@ element_get_property_parentElement(JSContext *ctx, unsigned int argc, JS::Value
static bool static bool
element_get_property_parentNode(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_parentNode(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1090,6 +1151,9 @@ element_get_property_parentNode(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
element_get_property_previousElementSibling(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_previousElementSibling(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1145,6 +1209,9 @@ element_get_property_previousElementSibling(JSContext *ctx, unsigned int argc, J
static bool static bool
element_get_property_previousSibling(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_previousSibling(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1191,6 +1258,9 @@ element_get_property_previousSibling(JSContext *ctx, unsigned int argc, JS::Valu
static bool static bool
element_get_property_tagName(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_tagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1231,6 +1301,9 @@ element_get_property_tagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1355,6 +1428,9 @@ walk_tree_content(struct string *buf, xmlpp::Node *node)
static bool static bool
element_get_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1397,6 +1473,9 @@ element_get_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_outerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_outerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1439,6 +1518,9 @@ element_get_property_outerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_get_property_textContent(JSContext *ctx, unsigned int argc, JS::Value *vp) element_get_property_textContent(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1482,6 +1564,9 @@ element_get_property_textContent(JSContext *ctx, unsigned int argc, JS::Value *v
static bool static bool
element_set_property_className(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_className(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1519,6 +1604,9 @@ element_set_property_className(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_dir(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_dir(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1560,6 +1648,9 @@ element_set_property_dir(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_id(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_id(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1597,6 +1688,9 @@ element_set_property_id(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1656,6 +1750,9 @@ element_set_property_innerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_innerText(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_innerText(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1700,6 +1797,9 @@ element_set_property_innerText(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_lang(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_lang(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1737,6 +1837,9 @@ element_set_property_lang(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_outerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_outerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1765,6 +1868,9 @@ element_set_property_outerHtml(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
element_set_property_textContent(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_textContent(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1794,6 +1900,9 @@ element_set_property_textContent(JSContext *ctx, unsigned int argc, JS::Value *v
static bool static bool
element_set_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp) element_set_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1891,6 +2000,9 @@ check_contains(xmlpp::Node *node, xmlpp::Node *searched, bool *result_set, bool
static bool static bool
element_appendChild(JSContext *ctx, unsigned int argc, JS::Value *rval) element_appendChild(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 1) { if (!comp || argc != 1) {
@ -1925,6 +2037,9 @@ element_appendChild(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_contains(JSContext *ctx, unsigned int argc, JS::Value *rval) element_contains(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 1) { if (!comp || argc != 1) {
@ -1967,6 +2082,9 @@ element_contains(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_getAttributeNode(JSContext *ctx, unsigned int argc, JS::Value *rval) element_getAttributeNode(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 1) { if (!comp || argc != 1) {
@ -1999,6 +2117,9 @@ element_getAttributeNode(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_hasAttribute(JSContext *ctx, unsigned int argc, JS::Value *rval) element_hasAttribute(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 1) { if (!comp || argc != 1) {
@ -2029,6 +2150,9 @@ element_hasAttribute(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_hasAttributes(JSContext *ctx, unsigned int argc, JS::Value *rval) element_hasAttributes(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 0) { if (!comp || argc != 0) {
@ -2057,6 +2181,9 @@ element_hasAttributes(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_hasChildNodes(JSContext *ctx, unsigned int argc, JS::Value *rval) element_hasChildNodes(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 0) { if (!comp || argc != 0) {
@ -2085,6 +2212,9 @@ element_hasChildNodes(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_insertBefore(JSContext *ctx, unsigned int argc, JS::Value *rval) element_insertBefore(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 2) { if (!comp || argc != 2) {
@ -2129,6 +2259,9 @@ element_insertBefore(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_isEqualNode(JSContext *ctx, unsigned int argc, JS::Value *rval) element_isEqualNode(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 1) { if (!comp || argc != 1) {
@ -2174,6 +2307,9 @@ element_isEqualNode(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_isSameNode(JSContext *ctx, unsigned int argc, JS::Value *rval) element_isSameNode(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 1) { if (!comp || argc != 1) {
@ -2206,6 +2342,9 @@ element_isSameNode(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_remove(JSContext *ctx, unsigned int argc, JS::Value *rval) element_remove(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 0) { if (!comp || argc != 0) {
@ -2235,6 +2374,9 @@ element_remove(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
element_setAttribute(JSContext *ctx, unsigned int argc, JS::Value *rval) element_setAttribute(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp || argc != 2) { if (!comp || argc != 2) {
@ -2317,6 +2459,9 @@ static JSPropertySpec htmlCollection_props[] = {
static bool static bool
htmlCollection_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp) htmlCollection_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2355,6 +2500,9 @@ htmlCollection_get_property_length(JSContext *ctx, unsigned int argc, JS::Value
static bool static bool
htmlCollection_item(JSContext *ctx, unsigned int argc, JS::Value *vp) htmlCollection_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2370,6 +2518,9 @@ htmlCollection_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
htmlCollection_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp) htmlCollection_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2386,6 +2537,9 @@ htmlCollection_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
htmlCollection_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp) htmlCollection_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -2423,6 +2577,9 @@ htmlCollection_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::Mutab
static bool static bool
htmlCollection_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp) htmlCollection_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -2466,6 +2623,9 @@ htmlCollection_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::
static bool static bool
htmlCollection_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) htmlCollection_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
jsid id = hid.get(); jsid id = hid.get();
struct view_state *vs; struct view_state *vs;
JS::Value idval; JS::Value idval;
@ -2510,6 +2670,9 @@ htmlCollection_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId
JSObject * JSObject *
getCollection(JSContext *ctx, void *node) getCollection(JSContext *ctx, void *node)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *el = JS_NewObject(ctx, &htmlCollection_class); JSObject *el = JS_NewObject(ctx, &htmlCollection_class);
if (!el) { if (!el) {
@ -2558,6 +2721,9 @@ static JSPropertySpec nodeList_props[] = {
static bool static bool
nodeList_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp) nodeList_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2595,6 +2761,9 @@ nodeList_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
nodeList_item(JSContext *ctx, unsigned int argc, JS::Value *vp) nodeList_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2610,6 +2779,9 @@ nodeList_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
nodeList_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp) nodeList_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -2652,6 +2824,9 @@ nodeList_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHand
static bool static bool
nodeList_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) nodeList_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
jsid id = hid.get(); jsid id = hid.get();
struct view_state *vs; struct view_state *vs;
JS::Value idval; JS::Value idval;
@ -2684,6 +2859,9 @@ nodeList_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, J
JSObject * JSObject *
getNodeList(JSContext *ctx, void *node) getNodeList(JSContext *ctx, void *node)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *el = JS_NewObject(ctx, &nodeList_class); JSObject *el = JS_NewObject(ctx, &nodeList_class);
if (!el) { if (!el) {
@ -2734,6 +2912,9 @@ static JSPropertySpec attributes_props[] = {
static bool static bool
attributes_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp) attributes_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2772,6 +2953,9 @@ attributes_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
attributes_item(JSContext *ctx, unsigned int argc, JS::Value *vp) attributes_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2787,6 +2971,9 @@ attributes_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
attributes_getNamedItem(JSContext *ctx, unsigned int argc, JS::Value *vp) attributes_getNamedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2802,6 +2989,9 @@ attributes_getNamedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
attributes_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp) attributes_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -2840,6 +3030,9 @@ attributes_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHa
static bool static bool
attributes_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp) attributes_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -2884,6 +3077,9 @@ attributes_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::Muta
static bool static bool
attributes_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) attributes_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
jsid id = hid.get(); jsid id = hid.get();
struct view_state *vs; struct view_state *vs;
JS::Value idval; JS::Value idval;
@ -2966,6 +3162,9 @@ static JSPropertySpec attr_props[] = {
static bool static bool
attr_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp) attr_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -3005,6 +3204,9 @@ attr_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
attr_get_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp) attr_get_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());

View File

@ -135,6 +135,9 @@ static struct form_state *input_get_form_state(JSContext *ctx, JSObject *jsinput
static bool static bool
input_get_property_accessKey(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_accessKey(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -194,6 +197,9 @@ input_get_property_accessKey(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_accessKey(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_accessKey(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -274,6 +280,9 @@ input_set_property_accessKey(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_alt(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_alt(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -312,6 +321,9 @@ input_get_property_alt(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_alt(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_alt(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
struct view_state *vs; struct view_state *vs;
@ -348,6 +360,9 @@ input_set_property_alt(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_checked(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_checked(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -364,6 +379,9 @@ input_get_property_checked(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_checked(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_checked(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -404,6 +422,9 @@ input_set_property_checked(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_defaultChecked(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_defaultChecked(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -441,6 +462,9 @@ input_get_property_defaultChecked(JSContext *ctx, unsigned int argc, JS::Value *
static bool static bool
input_get_property_defaultValue(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_defaultValue(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -479,6 +503,9 @@ input_get_property_defaultValue(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
input_get_property_disabled(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_disabled(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -517,6 +544,9 @@ input_get_property_disabled(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_disabled(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_disabled(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -557,6 +587,9 @@ input_set_property_disabled(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_form(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_form(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -572,6 +605,9 @@ input_get_property_form(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_maxLength(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_maxLength(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -609,6 +645,9 @@ input_get_property_maxLength(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_maxLength(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_maxLength(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -646,6 +685,9 @@ input_set_property_maxLength(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -684,6 +726,9 @@ input_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -729,6 +774,9 @@ input_set_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_readonly(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_readonly(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -774,6 +822,9 @@ input_get_property_readonly(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_readonly(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_readonly(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -820,6 +871,9 @@ input_set_property_readonly(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_selectedIndex(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_selectedIndex(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -869,6 +923,9 @@ input_get_property_selectedIndex(JSContext *ctx, unsigned int argc, JS::Value *v
static bool static bool
input_set_property_selectedIndex(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_selectedIndex(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -919,6 +976,9 @@ input_set_property_selectedIndex(JSContext *ctx, unsigned int argc, JS::Value *v
static bool static bool
input_get_property_size(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_size(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -962,6 +1022,9 @@ input_get_property_size(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_src(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_src(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1014,6 +1077,9 @@ input_get_property_src(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_src(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_src(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1065,6 +1131,9 @@ input_set_property_src(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_tabIndex(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_tabIndex(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1119,6 +1188,9 @@ input_get_property_tabIndex(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_type(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_type(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1177,6 +1249,9 @@ input_get_property_type(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_get_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp) input_get_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1198,6 +1273,9 @@ input_get_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
input_set_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp) input_set_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1283,6 +1361,9 @@ static const spidermonkeyFunctionSpec input_funcs[] = {
static struct form_state * static struct form_state *
input_get_form_state(JSContext *ctx, JSObject *jsinput) input_get_form_state(JSContext *ctx, JSObject *jsinput)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::RootedObject r_jsinput(ctx, jsinput); JS::RootedObject r_jsinput(ctx, jsinput);
struct form_state *fs = JS_GetInstancePrivate(ctx, r_jsinput, struct form_state *fs = JS_GetInstancePrivate(ctx, r_jsinput,
&input_class, &input_class,
@ -1300,6 +1381,9 @@ input_get_form_state(JSContext *ctx, JSObject *jsinput)
static bool static bool
input_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) input_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::RootedObject parent_form(ctx); /* instance of @form_class */ JS::RootedObject parent_form(ctx); /* instance of @form_class */
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
struct view_state *vs; struct view_state *vs;
@ -1325,6 +1409,9 @@ input_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::
static bool static bool
input_set_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) input_set_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
ELINKS_CAST_PROP_PARAMS ELINKS_CAST_PROP_PARAMS
jsid id = hid.get(); jsid id = hid.get();
@ -1352,6 +1439,9 @@ input_set_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::
static bool static bool
input_blur(JSContext *ctx, unsigned int argc, JS::Value *rval) input_blur(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
/* We are a text-mode browser and there *always* has to be something /* We are a text-mode browser and there *always* has to be something
* selected. So we do nothing for now. (That was easy.) */ * selected. So we do nothing for now. (That was easy.) */
return true; return true;
@ -1361,6 +1451,9 @@ input_blur(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
input_click(JSContext *ctx, unsigned int argc, JS::Value *rval) input_click(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::RootedObject parent_form(ctx); /* instance of @form_class */ JS::RootedObject parent_form(ctx); /* instance of @form_class */
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
@ -1415,6 +1508,9 @@ input_click(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
input_focus(JSContext *ctx, unsigned int argc, JS::Value *rval) input_focus(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::RootedObject parent_form(ctx); /* instance of @form_class */ JS::RootedObject parent_form(ctx); /* instance of @form_class */
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
@ -1463,6 +1559,9 @@ input_focus(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
input_select(JSContext *ctx, unsigned int argc, JS::Value *rval) input_select(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
/* We support no text selecting yet. So we do nothing for now. /* We support no text selecting yet. So we do nothing for now.
* (That was easy, too.) */ * (That was easy, too.) */
return true; return true;
@ -1471,6 +1570,9 @@ input_select(JSContext *ctx, unsigned int argc, JS::Value *rval)
static JSObject * static JSObject *
get_input_object(JSContext *ctx, struct form_state *fs) get_input_object(JSContext *ctx, struct form_state *fs)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *jsinput = fs->ecmascript_obj; JSObject *jsinput = fs->ecmascript_obj;
if (jsinput) { if (jsinput) {
@ -1504,6 +1606,9 @@ get_input_object(JSContext *ctx, struct form_state *fs)
static void static void
input_finalize(JSFreeOp *op, JSObject *jsinput) input_finalize(JSFreeOp *op, JSObject *jsinput)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct form_state *fs = JS_GetPrivate(jsinput); struct form_state *fs = JS_GetPrivate(jsinput);
if (fs) { if (fs) {
@ -1523,6 +1628,9 @@ input_finalize(JSFreeOp *op, JSObject *jsinput)
void void
spidermonkey_detach_form_state(struct form_state *fs) spidermonkey_detach_form_state(struct form_state *fs)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *jsinput = fs->ecmascript_obj; JSObject *jsinput = fs->ecmascript_obj;
if (jsinput) { if (jsinput) {
@ -1548,6 +1656,9 @@ spidermonkey_detach_form_state(struct form_state *fs)
void void
spidermonkey_moved_form_state(struct form_state *fs) spidermonkey_moved_form_state(struct form_state *fs)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *jsinput = fs->ecmascript_obj; JSObject *jsinput = fs->ecmascript_obj;
if (jsinput) { if (jsinput) {
@ -1565,6 +1676,9 @@ static JSObject *
get_form_control_object(JSContext *ctx, get_form_control_object(JSContext *ctx,
enum form_type type, struct form_state *fs) enum form_type type, struct form_state *fs)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
switch (type) { switch (type) {
case FC_TEXT: case FC_TEXT:
case FC_PASSWORD: case FC_PASSWORD:
@ -1635,6 +1749,9 @@ static JSPropertySpec form_elements_props[] = {
static bool static bool
form_elements_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) form_elements_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
jsid id = hid.get(); jsid id = hid.get();
JS::Value idval; JS::Value idval;
@ -1707,6 +1824,9 @@ form_elements_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId h
static bool static bool
form_elements_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp) form_elements_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1746,6 +1866,9 @@ form_elements_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *
static bool static bool
form_elements_item(JSContext *ctx, unsigned int argc, JS::Value *vp) form_elements_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1762,6 +1885,9 @@ form_elements_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_elements_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp) form_elements_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::RootedObject parent_form(ctx); /* instance of @form_class */ JS::RootedObject parent_form(ctx); /* instance of @form_class */
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
struct view_state *vs; struct view_state *vs;
@ -1817,6 +1943,9 @@ form_elements_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::Mutabl
static bool static bool
form_elements_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp) form_elements_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -1834,6 +1963,9 @@ form_elements_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_elements_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *string, JS::MutableHandleValue hvp) form_elements_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *string, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::RootedObject parent_form(ctx); /* instance of @form_class */ JS::RootedObject parent_form(ctx); /* instance of @form_class */
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
struct view_state *vs; struct view_state *vs;
@ -1925,6 +2057,9 @@ static const spidermonkeyFunctionSpec form_funcs[] = {
static struct form_view * static struct form_view *
form_get_form_view(JSContext *ctx, JSObject *jsform, JS::Value *argv) form_get_form_view(JSContext *ctx, JSObject *jsform, JS::Value *argv)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::RootedObject r_jsform(ctx, jsform); JS::RootedObject r_jsform(ctx, jsform);
struct form_view *fv = JS_GetInstancePrivate(ctx, r_jsform, struct form_view *fv = JS_GetInstancePrivate(ctx, r_jsform,
&form_class, &form_class,
@ -1942,6 +2077,9 @@ form_get_form_view(JSContext *ctx, JSObject *jsform, JS::Value *argv)
static bool static bool
form_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) form_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
ELINKS_CAST_PROP_PARAMS ELINKS_CAST_PROP_PARAMS
jsid id = hid.get(); jsid id = hid.get();
/* DBG("doc %p %s\n", parent_doc, JS_GetStringBytes(JS_ValueToString(ctx, OBJECT_TO_JSVAL(parent_doc)))); */ /* DBG("doc %p %s\n", parent_doc, JS_GetStringBytes(JS_ValueToString(ctx, OBJECT_TO_JSVAL(parent_doc)))); */
@ -2009,6 +2147,9 @@ form_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::M
static bool static bool
form_get_property_action(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_action(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2048,6 +2189,9 @@ form_get_property_action(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_set_property_action(JSContext *ctx, unsigned int argc, JS::Value *vp) form_set_property_action(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2094,6 +2238,9 @@ form_set_property_action(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_get_property_elements(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_elements(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2125,6 +2272,9 @@ form_get_property_elements(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_get_property_encoding(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_encoding(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2177,6 +2327,9 @@ form_get_property_encoding(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_set_property_encoding(JSContext *ctx, unsigned int argc, JS::Value *vp) form_set_property_encoding(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2226,6 +2379,9 @@ form_set_property_encoding(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2266,6 +2422,9 @@ form_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_get_property_method(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_method(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2317,6 +2476,9 @@ form_get_property_method(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_set_property_method(JSContext *ctx, unsigned int argc, JS::Value *vp) form_set_property_method(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2363,6 +2525,9 @@ form_set_property_method(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2404,6 +2569,9 @@ form_get_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_set_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp) form_set_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2443,6 +2611,9 @@ form_set_property_name(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_get_property_target(JSContext *ctx, unsigned int argc, JS::Value *vp) form_get_property_target(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2482,6 +2653,9 @@ form_get_property_target(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_set_property_target(JSContext *ctx, unsigned int argc, JS::Value *vp) form_set_property_target(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2523,6 +2697,9 @@ form_set_property_target(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
form_reset(JSContext *ctx, unsigned int argc, JS::Value *rval) form_reset(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
JSObject *obj = JS_THIS_OBJECT(ctx, rval); JSObject *obj = JS_THIS_OBJECT(ctx, rval);
@ -2564,6 +2741,9 @@ form_reset(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
form_submit(JSContext *ctx, unsigned int argc, JS::Value *rval) form_submit(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::RootedObject parent_doc(ctx); /* instance of @document_class */ JS::RootedObject parent_doc(ctx); /* instance of @document_class */
JSObject *obj = JS_THIS_OBJECT(ctx, rval); JSObject *obj = JS_THIS_OBJECT(ctx, rval);
@ -2604,6 +2784,9 @@ form_submit(JSContext *ctx, unsigned int argc, JS::Value *rval)
JSObject * JSObject *
get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv) get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *jsform = fv->ecmascript_obj; JSObject *jsform = fv->ecmascript_obj;
if (jsform) { if (jsform) {
@ -2636,6 +2819,9 @@ get_form_object(JSContext *ctx, JSObject *jsdoc, struct form_view *fv)
static void static void
form_finalize(JSFreeOp *op, JSObject *jsform) form_finalize(JSFreeOp *op, JSObject *jsform)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct form_view *fv = JS_GetPrivate(jsform); struct form_view *fv = JS_GetPrivate(jsform);
if (fv) { if (fv) {
@ -2655,6 +2841,9 @@ form_finalize(JSFreeOp *op, JSObject *jsform)
void void
spidermonkey_detach_form_view(struct form_view *fv) spidermonkey_detach_form_view(struct form_view *fv)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *jsform = fv->ecmascript_obj; JSObject *jsform = fv->ecmascript_obj;
if (jsform) { if (jsform) {
@ -2724,6 +2913,9 @@ find_form_by_name(JSContext *ctx,
struct document_view *doc_view, struct document_view *doc_view,
char *string, JS::MutableHandleValue hvp) char *string, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct form *form; struct form *form;
if (!*string) if (!*string)
@ -2742,6 +2934,9 @@ find_form_by_name(JSContext *ctx,
static bool static bool
forms_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) forms_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
// jsid id = hid.get(); // jsid id = hid.get();
JS::Value idval; JS::Value idval;
@ -2788,6 +2983,9 @@ forms_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::
static bool static bool
forms_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp) forms_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2823,6 +3021,9 @@ forms_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
forms_item(JSContext *ctx, unsigned int argc, JS::Value *vp) forms_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -2841,6 +3042,9 @@ forms_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
forms_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp) forms_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
// JS::RootedObject parent_doc(ctx); /* instance of @document_class */ // JS::RootedObject parent_doc(ctx); /* instance of @document_class */
struct view_state *vs; struct view_state *vs;
struct form_view *fv; struct form_view *fv;
@ -2875,6 +3079,9 @@ forms_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleV
static bool static bool
forms_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp) forms_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
// JS::RootedObject parent_doc(ctx); /* instance of @document_class */ // JS::RootedObject parent_doc(ctx); /* instance of @document_class */
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -2914,6 +3121,9 @@ forms_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
static JSString * static JSString *
unicode_to_jsstring(JSContext *ctx, unicode_val_T u) unicode_to_jsstring(JSContext *ctx, unicode_val_T u)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
char16_t buf[2]; char16_t buf[2];
/* This is supposed to make a string from which /* This is supposed to make a string from which
@ -2942,6 +3152,9 @@ unicode_to_jsstring(JSContext *ctx, unicode_val_T u)
static unicode_val_T static unicode_val_T
jsval_to_accesskey(JSContext *ctx, JS::MutableHandleValue hvp) jsval_to_accesskey(JSContext *ctx, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
size_t len; size_t len;
char16_t chr[2]; char16_t chr[2];
@ -2970,6 +3183,9 @@ jsval_to_accesskey(JSContext *ctx, JS::MutableHandleValue hvp)
JSObject * JSObject *
getForms(JSContext *ctx, void *node) getForms(JSContext *ctx, void *node)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *el = JS_NewObject(ctx, &forms_class); JSObject *el = JS_NewObject(ctx, &forms_class);
if (!el) { if (!el) {

View File

@ -119,6 +119,9 @@ const JSPropertySpec localstorage_props[] = {
static bool static bool
localstorage_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) localstorage_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *parent_win; /* instance of @window_class */ JSObject *parent_win; /* instance of @window_class */
return(true); return(true);
@ -136,6 +139,9 @@ const spidermonkeyFunctionSpec localstorage_funcs[] = {
static bool static bool
localstorage_getitem(JSContext *ctx, unsigned int argc, JS::Value *vp) localstorage_getitem(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
//jsval val; //jsval val;
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -173,6 +179,9 @@ localstorage_getitem(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
localstorage_setitem(JSContext *ctx, unsigned int argc, JS::Value *vp) localstorage_setitem(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct string key; struct string key;
struct string val; struct string val;

View File

@ -73,6 +73,9 @@ const spidermonkeyFunctionSpec history_funcs[] = {
static bool static bool
history_back(JSContext *ctx, unsigned int argc, JS::Value *rval) history_back(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -98,6 +101,9 @@ history_back(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
history_forward(JSContext *ctx, unsigned int argc, JS::Value *rval) history_forward(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -120,6 +126,9 @@ history_forward(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
history_go(JSContext *ctx, unsigned int argc, JS::Value *rval) history_go(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -207,6 +216,9 @@ JSPropertySpec location_props[] = {
static bool static bool
location_get_property_hash(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_hash(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -246,6 +258,9 @@ location_get_property_hash(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_host(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_host(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -284,6 +299,9 @@ location_get_property_host(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_hostname(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_hostname(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -322,6 +340,9 @@ location_get_property_hostname(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_href(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_href(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -360,6 +381,9 @@ location_get_property_href(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_origin(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_origin(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -398,6 +422,9 @@ location_get_property_origin(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_pathname(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_pathname(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -437,6 +464,9 @@ location_get_property_pathname(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_port(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_port(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -474,6 +504,9 @@ location_get_property_port(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_protocol(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_protocol(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -517,6 +550,9 @@ location_get_property_protocol(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_get_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp) location_get_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -558,6 +594,9 @@ location_get_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_hash(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_hash(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -591,6 +630,9 @@ location_set_property_hash(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_host(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_host(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -623,6 +665,9 @@ location_set_property_host(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_hostname(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_hostname(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -655,6 +700,9 @@ location_set_property_hostname(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_href(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_href(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -687,6 +735,9 @@ location_set_property_href(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_pathname(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_pathname(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -719,6 +770,9 @@ location_set_property_pathname(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_port(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_port(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -751,6 +805,9 @@ location_set_property_port(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_protocol(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_protocol(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -783,6 +840,9 @@ location_set_property_protocol(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
location_set_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp) location_set_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -825,6 +885,9 @@ const spidermonkeyFunctionSpec location_funcs[] = {
static bool static bool
location_reload(JSContext *ctx, unsigned int argc, JS::Value *rval) location_reload(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, rval); JS::CallArgs args = CallArgsFromVp(argc, rval);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -858,6 +921,9 @@ location_reload(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
location_toString(JSContext *ctx, unsigned int argc, JS::Value *rval) location_toString(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JSObject *obj = JS_THIS_OBJECT(ctx, rval); JSObject *obj = JS_THIS_OBJECT(ctx, rval);
JS::CallArgs args = JS::CallArgsFromVp(argc, rval); JS::CallArgs args = JS::CallArgsFromVp(argc, rval);

View File

@ -93,6 +93,9 @@ JSPropertySpec navigator_props[] = {
static bool static bool
navigator_get_property_appCodeName(JSContext *ctx, unsigned int argc, JS::Value *vp) navigator_get_property_appCodeName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setString(JS_NewStringCopyZ(ctx, "Mozilla")); /* More like a constant nowadays. */ args.rval().setString(JS_NewStringCopyZ(ctx, "Mozilla")); /* More like a constant nowadays. */
@ -102,6 +105,9 @@ navigator_get_property_appCodeName(JSContext *ctx, unsigned int argc, JS::Value
static bool static bool
navigator_get_property_appName(JSContext *ctx, unsigned int argc, JS::Value *vp) navigator_get_property_appName(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setString(JS_NewStringCopyZ(ctx, args.rval().setString(JS_NewStringCopyZ(ctx,
"ELinks (roughly compatible with Netscape Navigator, Mozilla and Microsoft Internet Explorer)")); "ELinks (roughly compatible with Netscape Navigator, Mozilla and Microsoft Internet Explorer)"));
@ -112,6 +118,9 @@ navigator_get_property_appName(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
navigator_get_property_appVersion(JSContext *ctx, unsigned int argc, JS::Value *vp) navigator_get_property_appVersion(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setString(JS_NewStringCopyZ(ctx, VERSION)); args.rval().setString(JS_NewStringCopyZ(ctx, VERSION));
@ -121,6 +130,9 @@ navigator_get_property_appVersion(JSContext *ctx, unsigned int argc, JS::Value *
static bool static bool
navigator_get_property_language(JSContext *ctx, unsigned int argc, JS::Value *vp) navigator_get_property_language(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
#ifdef CONFIG_NLS #ifdef CONFIG_NLS
@ -137,6 +149,9 @@ navigator_get_property_language(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
navigator_get_property_platform(JSContext *ctx, unsigned int argc, JS::Value *vp) navigator_get_property_platform(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setString(JS_NewStringCopyZ(ctx, system_name)); args.rval().setString(JS_NewStringCopyZ(ctx, system_name));
@ -146,6 +161,9 @@ navigator_get_property_platform(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
navigator_get_property_userAgent(JSContext *ctx, unsigned int argc, JS::Value *vp) navigator_get_property_userAgent(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
char *optstr; char *optstr;

View File

@ -73,6 +73,9 @@ JSPropertySpec screen_props[] = {
static bool static bool
screen_get_property_availHeight(JSContext *ctx, unsigned int argc, JS::Value *vp) screen_get_property_availHeight(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -110,6 +113,9 @@ screen_get_property_availHeight(JSContext *ctx, unsigned int argc, JS::Value *vp
static bool static bool
screen_get_property_availWidth(JSContext *ctx, unsigned int argc, JS::Value *vp) screen_get_property_availWidth(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -147,6 +153,9 @@ screen_get_property_availWidth(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
screen_get_property_height(JSContext *ctx, unsigned int argc, JS::Value *vp) screen_get_property_height(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -190,6 +199,9 @@ screen_get_property_height(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
screen_get_property_width(JSContext *ctx, unsigned int argc, JS::Value *vp) screen_get_property_width(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());

View File

@ -90,6 +90,9 @@ JSPropertySpec unibar_props[] = {
static bool static bool
unibar_get_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp) unibar_get_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());
@ -143,6 +146,9 @@ unibar_get_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
unibar_set_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp) unibar_set_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
JS::RootedObject hobj(ctx, &args.thisv().toObject()); JS::RootedObject hobj(ctx, &args.thisv().toObject());

View File

@ -97,6 +97,9 @@ JSPropertySpec window_props[] = {
static JSObject * static JSObject *
try_resolve_frame(struct document_view *doc_view, char *id) try_resolve_frame(struct document_view *doc_view, char *id)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct session *ses = doc_view->session; struct session *ses = doc_view->session;
struct frame *target; struct frame *target;
@ -113,6 +116,9 @@ try_resolve_frame(struct document_view *doc_view, char *id)
static struct frame_desc * static struct frame_desc *
find_child_frame(struct document_view *doc_view, struct frame_desc *tframe) find_child_frame(struct document_view *doc_view, struct frame_desc *tframe)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct frameset_desc *frameset = doc_view->document->frame_desc; struct frameset_desc *frameset = doc_view->document->frame_desc;
int i; int i;
@ -134,6 +140,9 @@ find_child_frame(struct document_view *doc_view, struct frame_desc *tframe)
static bool static bool
window_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) window_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
struct view_state *vs; struct view_state *vs;
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
@ -190,6 +199,9 @@ const spidermonkeyFunctionSpec window_funcs[] = {
static bool static bool
window_alert(JSContext *ctx, unsigned int argc, JS::Value *rval) window_alert(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::Value val; JS::Value val;
JSObject *obj = JS_THIS_OBJECT(ctx, rval); JSObject *obj = JS_THIS_OBJECT(ctx, rval);
JS::RootedObject hobj(ctx, obj); JS::RootedObject hobj(ctx, obj);
@ -233,6 +245,9 @@ window_alert(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
window_open(JSContext *ctx, unsigned int argc, JS::Value *rval) window_open(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSObject *obj = JS_THIS_OBJECT(ctx, rval); JSObject *obj = JS_THIS_OBJECT(ctx, rval);
JS::RootedObject hobj(ctx, obj); JS::RootedObject hobj(ctx, obj);
JS::CallArgs args = JS::CallArgsFromVp(argc, rval); JS::CallArgs args = JS::CallArgsFromVp(argc, rval);
@ -351,6 +366,9 @@ end:
static bool static bool
window_setTimeout(JSContext *ctx, unsigned int argc, JS::Value *rval) window_setTimeout(JSContext *ctx, unsigned int argc, JS::Value *rval)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JSCompartment *comp = js::GetContextCompartment(ctx); JSCompartment *comp = js::GetContextCompartment(ctx);
if (!comp) { if (!comp) {
@ -397,6 +415,9 @@ window_setTimeout(JSContext *ctx, unsigned int argc, JS::Value *rval)
static bool static bool
window_get_property_closed(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp) window_get_property_closed(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
ELINKS_CAST_PROP_PARAMS ELINKS_CAST_PROP_PARAMS
/* This can be called if @obj if not itself an instance of the /* This can be called if @obj if not itself an instance of the
@ -414,6 +435,9 @@ window_get_property_closed(JSContext *ctx, JS::HandleObject hobj, JS::HandleId h
static bool static bool
window_get_property_closed(JSContext *ctx, unsigned int argc, JS::Value *vp) window_get_property_closed(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setBoolean(false); args.rval().setBoolean(false);
@ -423,6 +447,9 @@ window_get_property_closed(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
window_get_property_parent(JSContext *ctx, unsigned int argc, JS::Value *vp) window_get_property_parent(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
/* XXX: It would be nice if the following worked, yes. /* XXX: It would be nice if the following worked, yes.
@ -443,6 +470,9 @@ window_get_property_parent(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
window_get_property_self(JSContext *ctx, unsigned int argc, JS::Value *vp) window_get_property_self(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setObject(args.thisv().toObject()); args.rval().setObject(args.thisv().toObject());
@ -452,6 +482,9 @@ window_get_property_self(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
window_get_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp) window_get_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setUndefined(); args.rval().setUndefined();
@ -461,6 +494,9 @@ window_get_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
window_set_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp) window_set_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) { if (args.length() != 1) {
return false; return false;
@ -489,6 +525,9 @@ window_set_property_status(JSContext *ctx, unsigned int argc, JS::Value *vp)
static bool static bool
window_get_property_top(JSContext *ctx, unsigned int argc, JS::Value *vp) window_get_property_top(JSContext *ctx, unsigned int argc, JS::Value *vp)
{ {
#ifdef ECMASCRIPT_DEBUG
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
#endif
JS::CallArgs args = CallArgsFromVp(argc, vp); JS::CallArgs args = CallArgsFromVp(argc, vp);
struct view_state *vs; struct view_state *vs;