mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[js] Start to adjust code for mozjs-60.
This commit is contained in:
parent
f211564a80
commit
b825f4abf1
@ -252,7 +252,7 @@ if conf_data.get('CONFIG_BZIP2')
|
||||
endif
|
||||
|
||||
if conf_data.get('CONFIG_ECMASCRIPT')
|
||||
mozjsdeps = dependency('mozjs-52')
|
||||
mozjsdeps = dependency('mozjs-60')
|
||||
deps += mozjsdeps
|
||||
sqlite3deps = dependency('sqlite3')
|
||||
deps += sqlite3deps
|
||||
|
@ -1,24 +1,6 @@
|
||||
#ifndef EL__ECMASCRIPT_SPIDERMONKEY_SHARED_H
|
||||
#define EL__ECMASCRIPT_SPIDERMONKEY_SHARED_H
|
||||
|
||||
/* Tell SpiderMonkey headers which operating system will be used.
|
||||
* With standalone SpiderMonkey 1.8.5, "pkg-config --cflags mozjs185"
|
||||
* does not define such a macro, so ELinks must do that here.
|
||||
* With xulrunner 2.0 however, "pkg-config --cflags mozilla-js"
|
||||
* already outputs -DXP_UNIX or similar. To prevent a warning about
|
||||
* macro redefinition, define the macro as 1, like -D does. */
|
||||
#ifdef CONFIG_OS_BEOS
|
||||
#define XP_BEOS 1
|
||||
#elif CONFIG_OS_OS2
|
||||
#define XP_OS2 1
|
||||
#elif CONFIG_OS_RISCOS
|
||||
#error Out of luck, buddy!
|
||||
#elif CONFIG_OS_UNIX
|
||||
#define XP_UNIX 1
|
||||
#elif CONFIG_OS_WIN32
|
||||
#define XP_WIN 1
|
||||
#endif
|
||||
|
||||
#include <jsapi.h>
|
||||
|
||||
#include "util/string.h"
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "elinks.h"
|
||||
|
||||
#include "ecmascript/spidermonkey/util.h"
|
||||
#include <jsprf.h>
|
||||
|
||||
#include "bfu/dialog.h"
|
||||
#include "cache/cache.h"
|
||||
@ -58,6 +57,8 @@
|
||||
#include "viewer/text/view.h"
|
||||
#include "viewer/text/vs.h"
|
||||
|
||||
#include <js/Printf.h>
|
||||
|
||||
#include <libxml++/libxml++.h>
|
||||
|
||||
/*** Global methods */
|
||||
@ -71,6 +72,8 @@ bool
|
||||
PrintError(JSContext* cx, FILE* file, JS::ConstUTF8CharsZ toStringResult,
|
||||
JSErrorReport* report, bool reportWarnings)
|
||||
{
|
||||
return true;
|
||||
#if 0
|
||||
MOZ_ASSERT(report);
|
||||
|
||||
/* Conditionally ignore reported warnings. */
|
||||
@ -143,6 +146,7 @@ PrintError(JSContext* cx, FILE* file, JS::ConstUTF8CharsZ toStringResult,
|
||||
fflush(file);
|
||||
JS_free(cx, prefix);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -36,8 +36,8 @@
|
||||
static bool console_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
|
||||
JSClassOps console_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
console_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
console_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -62,8 +62,8 @@ static JSObject *getDoctype(JSContext *ctx, void *node);
|
||||
static bool document_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
|
||||
JSClassOps document_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
document_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
document_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -1702,8 +1702,8 @@ document_getElementsByTagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
}
|
||||
|
||||
JSClassOps doctype_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -93,8 +93,8 @@ static bool element_get_property_title(JSContext *ctx, unsigned int argc, JS::Va
|
||||
static bool element_set_property_title(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps element_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -2433,8 +2433,8 @@ static bool htmlCollection_item2(JSContext *ctx, JS::HandleObject hobj, int inde
|
||||
static bool htmlCollection_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp);
|
||||
|
||||
JSClassOps htmlCollection_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
htmlCollection_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
htmlCollection_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -2665,7 +2665,7 @@ htmlCollection_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId
|
||||
}
|
||||
}
|
||||
|
||||
return JS_PropertyStub(ctx, hobj, hid, hvp);
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *
|
||||
@ -2696,8 +2696,8 @@ static bool nodeList_get_property(JSContext *ctx, JS::HandleObject hobj, JS::Han
|
||||
static bool nodeList_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp);
|
||||
|
||||
JSClassOps nodeList_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nodeList_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nodeList_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -2854,7 +2854,7 @@ nodeList_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, J
|
||||
return nodeList_item2(ctx, hobj, index, hvp);
|
||||
}
|
||||
|
||||
return JS_PropertyStub(ctx, hobj, hid, hvp);
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *
|
||||
@ -2886,8 +2886,8 @@ static bool attributes_item2(JSContext *ctx, JS::HandleObject hobj, int index, J
|
||||
static bool attributes_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp);
|
||||
|
||||
JSClassOps attributes_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
attributes_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
attributes_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -3117,7 +3117,7 @@ attributes_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid,
|
||||
}
|
||||
#endif
|
||||
|
||||
return JS_PropertyStub(ctx, hobj, hid, hvp);
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *
|
||||
@ -3143,8 +3143,8 @@ static bool attr_get_property_name(JSContext *ctx, unsigned int argc, JS::Value
|
||||
static bool attr_get_property_value(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps attr_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -68,8 +68,8 @@ static bool form_set_property_target(JSContext *ctx, unsigned int argc, JS::Valu
|
||||
static void form_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static JSClassOps form_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
form_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
form_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, form_finalize
|
||||
};
|
||||
|
||||
@ -92,7 +92,7 @@ static bool input_set_property(JSContext *ctx, JS::HandleObject hobj, JS::Handle
|
||||
static void input_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static JSClassOps input_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nullptr, nullptr,
|
||||
input_get_property, input_set_property,
|
||||
nullptr, nullptr, nullptr, input_finalize
|
||||
};
|
||||
@ -1708,8 +1708,8 @@ static struct form_view *form_get_form_view(JSContext *ctx, JSObject *jsform, JS
|
||||
static bool form_elements_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
|
||||
static JSClassOps form_elements_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
form_elements_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
form_elements_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -1791,7 +1791,7 @@ form_elements_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId h
|
||||
|
||||
std::string test = string;
|
||||
if (test == "item" || test == "namedItem") {
|
||||
return JS_PropertyStub(ctx, hobj, hid, hvp);
|
||||
return true;
|
||||
}
|
||||
|
||||
form_elements_namedItem2(ctx, hobj, string, hvp);
|
||||
@ -2871,8 +2871,8 @@ static bool forms_get_property(JSContext *ctx, JS::HandleObject hobj, JS::Handle
|
||||
static bool forms_get_property_length(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps forms_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
forms_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
forms_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -2965,7 +2965,7 @@ forms_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::
|
||||
std::string test = string;
|
||||
|
||||
if (test == "item" || test == "namedItem") {
|
||||
return JS_PropertyStub(ctx, hobj, hid, hvp);
|
||||
return true;
|
||||
}
|
||||
find_form_by_name(ctx, doc_view, string, hvp);
|
||||
|
||||
|
@ -99,8 +99,8 @@ saveToStorage(unsigned char *key, unsigned char *val)
|
||||
static bool localstorage_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
|
||||
JSClassOps localstorage_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
localstorage_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
localstorage_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -51,8 +51,8 @@ static bool history_forward(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
static bool history_go(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
|
||||
JSClassOps history_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -182,8 +182,8 @@ static bool location_get_property_search(JSContext *ctx, unsigned int argc, JS::
|
||||
static bool location_set_property_search(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps location_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
/* Each @location_class object must have a @window_class parent. */
|
||||
|
@ -52,8 +52,8 @@ static bool navigator_get_property_platform(JSContext *ctx, unsigned int argc, J
|
||||
static bool navigator_get_property_userAgent(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps navigator_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -46,8 +46,8 @@
|
||||
#include "viewer/text/vs.h"
|
||||
|
||||
JSClassOps screen_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -49,8 +49,8 @@ static bool unibar_get_property_visible(JSContext *ctx, unsigned int argc, JS::V
|
||||
static bool unibar_set_property_visible(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps menubar_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
@ -62,8 +62,8 @@ JSClass menubar_class = {
|
||||
};
|
||||
|
||||
JSClassOps statusbar_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
/* Each @statusbar_class object must have a @window_class parent. */
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
#ifndef EL__ECMASCRIPT_SPIDERMONKEY_UTIL_H
|
||||
#define EL__ECMASCRIPT_SPIDERMONKEY_UTIL_H
|
||||
|
||||
|
@ -54,8 +54,8 @@ static bool window_set_property_status(JSContext *ctx, unsigned int argc, JS::Va
|
||||
static bool window_get_property_top(JSContext *ctx, unsigned int argc, JS::Value *vp);
|
||||
|
||||
JSClassOps window_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
window_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
window_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,8 @@ static void smjs_action_fn_finalize(JSFreeOp *op, JSObject *obj);
|
||||
static bool smjs_action_fn_callback(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
|
||||
static JSClassOps action_fn_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr,
|
||||
smjs_action_fn_finalize,
|
||||
NULL,
|
||||
@ -188,8 +188,8 @@ action_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS:
|
||||
}
|
||||
|
||||
static JSClassOps action_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
action_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
action_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr,
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@ static void bookmark_finalize(JSFreeOp *op, JSObject *obj);
|
||||
static bool bookmark_folder_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
|
||||
static JSClassOps bookmark_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, bookmark_finalize,
|
||||
};
|
||||
|
||||
@ -33,8 +33,8 @@ static const JSClass bookmark_class = {
|
||||
};
|
||||
|
||||
static JSClassOps bookmark_folder_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
bookmark_folder_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
bookmark_folder_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, bookmark_finalize,
|
||||
};
|
||||
|
||||
|
@ -18,8 +18,8 @@
|
||||
static void cache_entry_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static JSClassOps cache_entry_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, cache_entry_finalize
|
||||
};
|
||||
|
||||
|
@ -109,7 +109,7 @@ static bool elinks_get_property(JSContext *ctx, JS::HandleObject hobj, JS::Handl
|
||||
static bool elinks_set_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId hid, JS::MutableHandleValue hvp);
|
||||
|
||||
static const JSClassOps elinks_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nullptr, nullptr,
|
||||
elinks_get_property, elinks_set_property,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
@ -16,8 +16,8 @@ using namespace JS;
|
||||
JSObject *smjs_global_object;
|
||||
|
||||
static const JSClassOps global_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ static bool smjs_globhist_item_set_property(JSContext *ctx, JS::HandleObject hob
|
||||
static void smjs_globhist_item_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static const JSClassOps smjs_globhist_item_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nullptr, nullptr,
|
||||
smjs_globhist_item_get_property, smjs_globhist_item_set_property,
|
||||
nullptr, nullptr, nullptr,
|
||||
smjs_globhist_item_finalize,
|
||||
@ -248,8 +248,8 @@ ret_null:
|
||||
}
|
||||
|
||||
static const JSClassOps smjs_globhist_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
smjs_globhist_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
smjs_globhist_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ static bool keymap_set_property(JSContext *ctx, JS::HandleObject hobj, JS::Handl
|
||||
static void keymap_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static const JSClassOps keymap_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nullptr, nullptr,
|
||||
keymap_get_property, keymap_set_property,
|
||||
nullptr, nullptr, nullptr, keymap_finalize,
|
||||
};
|
||||
@ -225,8 +225,8 @@ smjs_get_keymap_object(enum keymap_id keymap_id)
|
||||
}
|
||||
|
||||
static const JSClassOps keymap_hash_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr,
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ static void session_finalize(JSFreeOp *op, JSObject *obj);
|
||||
static bool session_construct(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
|
||||
static const JSClassOps session_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nullptr, nullptr,
|
||||
session_get_property, session_set_property,
|
||||
nullptr, nullptr, nullptr, session_finalize,
|
||||
NULL, NULL, NULL, session_construct
|
||||
@ -52,8 +52,8 @@ static bool smjs_location_array_get_property(JSContext *ctx, JS::HandleObject ho
|
||||
static void smjs_location_array_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static const JSClassOps location_array_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
smjs_location_array_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
smjs_location_array_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, smjs_location_array_finalize,
|
||||
};
|
||||
|
||||
@ -1086,8 +1086,8 @@ session_array_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId h
|
||||
}
|
||||
|
||||
static const JSClassOps session_array_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
session_array_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
session_array_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@ static bool terminal_get_property(JSContext *ctx, JS::HandleObject hobj, JS::Han
|
||||
static void terminal_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static const JSClassOps terminal_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
terminal_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
terminal_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, terminal_finalize
|
||||
};
|
||||
|
||||
@ -192,8 +192,8 @@ terminal_array_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId
|
||||
}
|
||||
|
||||
static const JSClassOps terminal_array_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
terminal_array_get_property, JS_StrictPropertyStub,
|
||||
nullptr, nullptr,
|
||||
terminal_array_get_property, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,7 @@ static bool view_state_set_property(JSContext *ctx, JS::HandleObject hobj, JS::H
|
||||
static void view_state_finalize(JSFreeOp *op, JSObject *obj);
|
||||
|
||||
static const JSClassOps view_state_ops = {
|
||||
JS_PropertyStub, nullptr,
|
||||
nullptr, nullptr,
|
||||
view_state_get_property, view_state_set_property,
|
||||
nullptr, nullptr, nullptr, view_state_finalize
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user