Closed Bug 1564170 Opened 5 years ago Closed 5 years ago

[jsdbg2] Debugger should use NativeObject subclasses for all Debugger.Foo API objects

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: jimb, Assigned: jimb)

References

(Blocks 1 open bug)

Details

(Whiteboard: [debugger-mvp])

Attachments

(4 files)

The Debugger implementation does not define C++ classes derived from NativeObject for all its Debugger.Foo types—for example, there is no DebuggerScript class—so that many of C++'s basic structuring tools like member functions, member types, and static data members are not available. Basic SpiderMonkey tools like the is<> and as<> methods on JSObject don't work. Definitions are simply given DebuggerScript_ prefixes. This code should be modernized.

Priority: -- → P3
Assignee: nobody → jimb
Blocks: dbg-70
Status: NEW → ASSIGNED
Whiteboard: [debugger-mvp]
Keywords: leave-open
Attachment #9077015 - Attachment description: Bug 1564170: Give Debugger.Script instances their own NativeObject subclass, DebuggerScript. → Bug 1564170: Give Debugger.Script instances their own NativeObject subclass, DebuggerScript. r?jorendorff
Attachment #9077016 - Attachment description: Bug 1564170: Make Debugger.Script referent variant matcher classes into member classes of DebuggerScript. → Bug 1564170: Make Debugger.Script referent variant matcher classes into member classes of DebuggerScript. r?jorendorff
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/61c49c2a77f7 Give Debugger.Script instances their own NativeObject subclass, DebuggerScript. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/fe088addd88a Make Debugger.Script referent variant matcher classes into member classes of DebuggerScript. r=jorendorff

As suggested in patch review, some of the mozilla::Variant matcher classes in
Script.cpp could be written more clearly using lambda-based matching. This patch
applies that technique in the implementations of DebuggerScript's create,
getStartLine, and getFormat methods.

Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5fa9803f6070 Give Debugger.Source instances their own NativeObject subclass, DebuggerSource. r=jorendorff
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7541e22758eb Clean up some DebuggerScript referent matchers. r=jorendorff
Attachment #9079153 - Attachment description: Bug 1564170: Clean up some DebuggerScript referent matchers. r?jorendorff → Bug 1564170: Clean up some DebuggerScript referent matchers. r=jorendorff
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4e68e94c2d26 Clean up some DebuggerScript referent matchers. r=jorendorff
Flags: needinfo?(jimb)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: