Closed Bug 1577798 Opened 5 years ago Closed 5 years ago

Logged Content function is missing "jump to definition" icon in Omniscient Browser Toolbox

Categories

(DevTools :: Console, task, P1)

task

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission-m1)

Attachments

(1 file)

Steps to reproduce

  1. Navigate to https://nchevobbe.github.io/demo/console-test-app.html
  2. Open the console
  3. Evaluate console.log(handleLog)

Expected results

The handleLog function appears in the Omniscient Browser Toolbox, with the "jump to definition" icon, allowing to navigate to the debugger

Actual results

The icon doesn't appear.

This is because we don't have a location property in the grip.
And we don't have it because we don't get into this if block (devtools/server/actors/object/previewers.js#124-132 )

Basically, this:

const script = dbgGlobal.makeDebuggeeValue(obj.unsafeDereference()).script;

returns something falsy.

Previously we were always getting the webconsole actor parent
thread actor to get the location of a script. That works well
in a tab, but when in the omniscient browser toolbox, we
need the appropriate global for this.
Since we only need the global debuggee to create a proper debuggee
value for the function, we remove the getGlobalDebugObject hook
and replace it with a makeDebuggeeValue function, where we can
re-use WebConsoleActor's makeDebuggeeValue.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
Attachment #9090311 - Attachment description: Bug 1577798 - Use function's global debugee to get script location. r=ochameau. → Bug 1577798 - Don't create a new Debugger instance in WebConsoleActor. r=ochameau.
Blocks: 1580181
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5873711a3f08
Don't create a new Debugger instance in WebConsoleActor. r=ochameau,jlast.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Whiteboard: dt-fission → dt-fission dt-fission-m1
Whiteboard: dt-fission dt-fission-m1 → dt-fission-m1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: