Bug 1546727: Make DebuggerFrame_getScript a static method of DebuggerFrame. r=jorendorff

This function probably predates the existence of the DebuggerFrame class, and
was never moved in.

Depends on D28785

Differential Revision: https://phabricator.services.mozilla.com/D28786

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jim Blandy 2019-05-14 02:55:22 +00:00
Родитель fdab7786dc
Коммит 88a0ac1f0e
2 изменённых файлов: 5 добавлений и 3 удалений

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

@ -9811,7 +9811,7 @@ bool DebuggerFrame::olderGetter(JSContext* cx, unsigned argc, Value* vp) {
}
// The getter used for each element of frame.arguments.
// See DebuggerFrame_getArguments.
// See DebuggerFrame::getArguments.
static bool DebuggerArguments_getArg(JSContext* cx, unsigned argc, Value* vp) {
CallArgs args = CallArgsFromVp(argc, vp);
int32_t i = args.callee().as<JSFunction>().getExtendedSlot(0).toInt32();
@ -9932,7 +9932,8 @@ bool DebuggerFrame::argumentsGetter(JSContext* cx, unsigned argc, Value* vp) {
return true;
}
static bool DebuggerFrame_getScript(JSContext* cx, unsigned argc, Value* vp) {
/* static */
bool DebuggerFrame::getScript(JSContext* cx, unsigned argc, Value* vp) {
THIS_FRAME(cx, argc, vp, "get script", args, thisobj, frameIter, frame);
Debugger* debug = Debugger::fromChildJSObject(thisobj);
@ -10149,7 +10150,7 @@ const JSPropertySpec DebuggerFrame::properties_[] = {
JS_PSG("live", DebuggerFrame::liveGetter, 0),
JS_PSG("offset", DebuggerFrame::offsetGetter, 0),
JS_PSG("older", DebuggerFrame::olderGetter, 0),
JS_PSG("script", DebuggerFrame_getScript, 0),
JS_PSG("script", DebuggerFrame::getScript, 0),
JS_PSG("this", DebuggerFrame::thisGetter, 0),
JS_PSG("type", DebuggerFrame::typeGetter, 0),
JS_PSG("implementation", DebuggerFrame::implementationGetter, 0),

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

@ -1456,6 +1456,7 @@ class DebuggerFrame : public NativeObject {
const FrameIter& iter,
HandleNativeObject debugger);
static MOZ_MUST_USE bool getScript(JSContext* cx, unsigned argc, Value* vp);
static MOZ_MUST_USE bool getArguments(JSContext* cx,
HandleDebuggerFrame frame,
MutableHandleDebuggerArguments result);