Reviewers: conroy, jat, fabiomfv,
Description:
Devmode support for Firefox >= 4b12.
Mozilla commit
http://hg.mozilla.org/releases/mozilla-2.0/rev/4b56bfdf61a7
changed the JSAPI property setter method signature. This adds devmode
support for the updated API.
Please review this at http://gwt-code-reviews.appspot.com/1383803/
Affected files:
M plugins/xpcom/JavaObject.cpp
M plugins/xpcom/JavaObject.h
Index: plugins/xpcom/JavaObject.cpp
===================================================================
--- plugins/xpcom/JavaObject.cpp (revision 9860)
+++ plugins/xpcom/JavaObject.cpp (working copy)
@@ -169,8 +169,14 @@
return JS_TRUE;
}
+#if GECKO_VERSION < 2000
JSBool JavaObject::setProperty(JSContext* ctx, JSObject* obj, jsid id,
jsval* vp) {
+#else
+JSBool JavaObject::setProperty(JSContext* ctx, JSObject* obj, jsid id,
+ JSBool strict, jsval* vp) {
+#endif //GECKO_VERSION
+
Debug::log(Debug::Spam) << "JavaObject::setProperty obj=" << obj <<
Debug::flush;
if (!JSID_IS_INT(id)) {
Debug::log(Debug::Error) << " Error: setting string property id" <<
Debug::flush;
Index: plugins/xpcom/JavaObject.h
===================================================================
--- plugins/xpcom/JavaObject.h (revision 9860)
+++ plugins/xpcom/JavaObject.h (working copy)
@@ -39,7 +39,13 @@
static JSObject* construct(JSContext* ctx, SessionData* data, int
objectRef);
static int getObjectId(JSContext* ctx, JSObject* obj);
static JSBool getProperty(JSContext* ctx, JSObject* obj, jsid id, jsval*
vp);
+
+#if GECKO_VERSION < 2000
static JSBool setProperty(JSContext* ctx, JSObject* obj, jsid id, jsval*
vp);
+#else
+ static JSBool setProperty(JSContext* ctx, JSObject* obj, jsid id, JSBool
strict, jsval* vp);
+#endif //GECKO_VERSION
+
static JSBool resolve(JSContext* ctx, JSObject* obj, jsval id);
static JSBool convert(JSContext* cx, JSObject* obj, JSType type, jsval*
vp);
static JSBool enumerate(JSContext* ctx, JSObject* obj, JSIterateOp op,
jsval* statep, jsid* idp);
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors