Bug 1271653 - Move properties into DebuggerObject;r=jimb

This commit is contained in:
Eddy Bruel 2016-06-08 09:48:23 +02:00
Родитель 673c010895
Коммит 515ca2ed0a
2 изменённых файлов: 65 добавлений и 49 удалений

Просмотреть файл

@ -7869,8 +7869,8 @@ DebuggerObject_construct(JSContext* cx, unsigned argc, Value* vp)
return false; return false;
} }
static bool /* static */ bool
DebuggerObject_getProto(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::protoGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get proto", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get proto", args, object)
@ -7882,8 +7882,8 @@ DebuggerObject_getProto(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getClass(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::classGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get class", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get class", args, object)
@ -7895,8 +7895,8 @@ DebuggerObject_getClass(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getCallable(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::callableGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get callable", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get callable", args, object)
@ -7904,8 +7904,8 @@ DebuggerObject_getCallable(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getName(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::nameGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get name", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get name", args, object)
@ -7925,8 +7925,8 @@ DebuggerObject_getName(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getDisplayName(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::displayNameGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get displayName", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get displayName", args, object)
@ -7946,8 +7946,8 @@ DebuggerObject_getDisplayName(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getParameterNames(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::parameterNamesGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get parameterNames", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get parameterNames", args, object)
@ -7978,8 +7978,8 @@ DebuggerObject_getParameterNames(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getScript(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::scriptGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT_OWNER_REFERENT(cx, argc, vp, "get script", args, dbg, obj); THIS_DEBUGOBJECT_OWNER_REFERENT(cx, argc, vp, "get script", args, dbg, obj);
@ -8012,8 +8012,8 @@ DebuggerObject_getScript(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getEnvironment(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::environmentGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT_OWNER_REFERENT(cx, argc, vp, "get environment", args, dbg, obj); THIS_DEBUGOBJECT_OWNER_REFERENT(cx, argc, vp, "get environment", args, dbg, obj);
@ -8041,8 +8041,8 @@ DebuggerObject_getEnvironment(JSContext* cx, unsigned argc, Value* vp)
return dbg->wrapEnvironment(cx, env, args.rval()); return dbg->wrapEnvironment(cx, env, args.rval());
} }
static bool /* static */ bool
DebuggerObject_getIsArrowFunction(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::isArrowFunctionGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get isArrowFunction", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get isArrowFunction", args, object)
@ -8055,8 +8055,8 @@ DebuggerObject_getIsArrowFunction(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getIsBoundFunction(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::isBoundFunctionGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get isBoundFunction", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get isBoundFunction", args, object)
@ -8069,8 +8069,8 @@ DebuggerObject_getIsBoundFunction(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getBoundTargetFunction(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::boundTargetFunctionGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get boundTargetFunction", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get boundTargetFunction", args, object)
@ -8089,8 +8089,8 @@ DebuggerObject_getBoundTargetFunction(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getBoundThis(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::boundThisGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get boundThis", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get boundThis", args, object)
@ -8104,8 +8104,8 @@ DebuggerObject_getBoundThis(JSContext* cx, unsigned argc, Value* vp)
return DebuggerObject::boundThis(cx, object, args.rval()); return DebuggerObject::boundThis(cx, object, args.rval());
} }
static bool /* static */ bool
DebuggerObject_getBoundArguments(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::boundArgumentsGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get boundArguments", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get boundArguments", args, object)
@ -8271,8 +8271,8 @@ DebuggerObject_getPromiseDependentPromises(JSContext* cx, unsigned argc, Value*
} }
#endif // SPIDERMONKEY_PROMISE #endif // SPIDERMONKEY_PROMISE
static bool /* static */ bool
DebuggerObject_getGlobal(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::globalGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get global", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get global", args, object)
@ -8284,8 +8284,8 @@ DebuggerObject_getGlobal(JSContext* cx, unsigned argc, Value* vp)
return true; return true;
} }
static bool /* static */ bool
DebuggerObject_getAllocationSite(JSContext* cx, unsigned argc, Value* vp) DebuggerObject::allocationSiteGetter(JSContext* cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get allocationSite", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get allocationSite", args, object)
@ -8300,8 +8300,8 @@ DebuggerObject_getAllocationSite(JSContext* cx, unsigned argc, Value* vp)
// Returns the "name" field (see js.msg), which may be used as a unique // Returns the "name" field (see js.msg), which may be used as a unique
// identifier, for any error object with a JSErrorReport or undefined // identifier, for any error object with a JSErrorReport or undefined
// if the object has no JSErrorReport. // if the object has no JSErrorReport.
static bool /* static */ bool
DebuggerObject_getErrorMessageName(JSContext *cx, unsigned argc, Value* vp) DebuggerObject::errorMessageNameGetter(JSContext *cx, unsigned argc, Value* vp)
{ {
THIS_DEBUGOBJECT(cx, argc, vp, "get errorMessageName", args, object) THIS_DEBUGOBJECT(cx, argc, vp, "get errorMessageName", args, object)
@ -8718,22 +8718,22 @@ DebuggerObject_unwrap(JSContext* cx, unsigned argc, Value* vp)
} }
const JSPropertySpec DebuggerObject::properties_[] = { const JSPropertySpec DebuggerObject::properties_[] = {
JS_PSG("proto", DebuggerObject_getProto, 0), JS_PSG("proto", DebuggerObject::protoGetter, 0),
JS_PSG("class", DebuggerObject_getClass, 0), JS_PSG("class", DebuggerObject::classGetter, 0),
JS_PSG("callable", DebuggerObject_getCallable, 0), JS_PSG("callable", DebuggerObject::callableGetter, 0),
JS_PSG("name", DebuggerObject_getName, 0), JS_PSG("name", DebuggerObject::nameGetter, 0),
JS_PSG("displayName", DebuggerObject_getDisplayName, 0), JS_PSG("displayName", DebuggerObject::displayNameGetter, 0),
JS_PSG("parameterNames", DebuggerObject_getParameterNames, 0), JS_PSG("parameterNames", DebuggerObject::parameterNamesGetter, 0),
JS_PSG("script", DebuggerObject_getScript, 0), JS_PSG("script", DebuggerObject::scriptGetter, 0),
JS_PSG("environment", DebuggerObject_getEnvironment, 0), JS_PSG("environment", DebuggerObject::environmentGetter, 0),
JS_PSG("isArrowFunction", DebuggerObject_getIsArrowFunction, 0), JS_PSG("isArrowFunction", DebuggerObject::isArrowFunctionGetter, 0),
JS_PSG("isBoundFunction", DebuggerObject_getIsBoundFunction, 0), JS_PSG("isBoundFunction", DebuggerObject::isBoundFunctionGetter, 0),
JS_PSG("boundTargetFunction", DebuggerObject_getBoundTargetFunction, 0), JS_PSG("boundTargetFunction", DebuggerObject::boundTargetFunctionGetter, 0),
JS_PSG("boundThis", DebuggerObject_getBoundThis, 0), JS_PSG("boundThis", DebuggerObject::boundThisGetter, 0),
JS_PSG("boundArguments", DebuggerObject_getBoundArguments, 0), JS_PSG("boundArguments", DebuggerObject::boundArgumentsGetter, 0),
JS_PSG("global", DebuggerObject_getGlobal, 0), JS_PSG("global", DebuggerObject::globalGetter, 0),
JS_PSG("allocationSite", DebuggerObject_getAllocationSite, 0), JS_PSG("allocationSite", DebuggerObject::allocationSiteGetter, 0),
JS_PSG("errorMessageName", DebuggerObject_getErrorMessageName, 0), JS_PSG("errorMessageName", DebuggerObject::errorMessageNameGetter, 0),
JS_PS_END JS_PS_END
}; };

Просмотреть файл

@ -1063,7 +1063,6 @@ class DebuggerObject : public NativeObject
static bool name(JSContext* cx, Handle<DebuggerObject*> object, MutableHandleString result); static bool name(JSContext* cx, Handle<DebuggerObject*> object, MutableHandleString result);
static bool displayName(JSContext* cx, Handle<DebuggerObject*> object, static bool displayName(JSContext* cx, Handle<DebuggerObject*> object,
MutableHandleString result); MutableHandleString result);
static bool parameterNames(JSContext* cx, Handle<DebuggerObject*> object, static bool parameterNames(JSContext* cx, Handle<DebuggerObject*> object,
MutableHandle<StringVector> result); MutableHandle<StringVector> result);
static bool boundTargetFunction(JSContext* cx, Handle<DebuggerObject*> object, static bool boundTargetFunction(JSContext* cx, Handle<DebuggerObject*> object,
@ -1134,6 +1133,23 @@ class DebuggerObject : public NativeObject
} }
Debugger* owner() const; Debugger* owner() const;
static bool protoGetter(JSContext* cx, unsigned argc, Value* vp);
static bool classGetter(JSContext* cx, unsigned argc, Value* vp);
static bool callableGetter(JSContext* cx, unsigned argc, Value* vp);
static bool nameGetter(JSContext* cx, unsigned argc, Value* vp);
static bool displayNameGetter(JSContext* cx, unsigned argc, Value* vp);
static bool parameterNamesGetter(JSContext* cx, unsigned argc, Value* vp);
static bool scriptGetter(JSContext* cx, unsigned argc, Value* vp);
static bool environmentGetter(JSContext* cx, unsigned argc, Value* vp);
static bool isArrowFunctionGetter(JSContext* cx, unsigned argc, Value* vp);
static bool isBoundFunctionGetter(JSContext* cx, unsigned argc, Value* vp);
static bool boundTargetFunctionGetter(JSContext* cx, unsigned argc, Value* vp);
static bool boundThisGetter(JSContext* cx, unsigned argc, Value* vp);
static bool boundArgumentsGetter(JSContext* cx, unsigned argc, Value* vp);
static bool globalGetter(JSContext* cx, unsigned argc, Value* vp);
static bool allocationSiteGetter(JSContext* cx, unsigned argc, Value* vp);
static bool errorMessageNameGetter(JSContext* cx, unsigned argc, Value* vp);
}; };
class BreakpointSite { class BreakpointSite {