예제 #1
0
JSBool JavaObject::setPropertyWrapper(JSContext* ctx, JSHandleObject obj,
    JSHandleId id, JSBool strict, jsval *vp) {
#if GECKO_VERSION >= 16000
  return setProperty(ctx, obj.get(), id.get(), strict, vp);
#else
  return setProperty(ctx, obj.value(), id.value(), strict, vp);
#endif
}
예제 #2
0
JSBool JavaObject::getPropertyWrapper(JSContext* ctx, JSHandleObject obj,
    JSHandleId id, JSMutableHandleValue vp) {
  jsval rval;
  JSBool result = JavaObject::getProperty(ctx, obj.get(), id.get(), &rval);
  vp.set(rval);
  return result;
}
JSBool
setProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, JSMutableHandleValue vp)
{
  printf("in setProperty %ld=%s\n",JSID_BITS(id.get()),JS_EncodeString(cx,JS_ValueToString(cx,vp.get())));
  return true;
}