Closed Bug 1327795 Opened 8 years ago Closed 2 years ago

about:debugging - style editor doesn't show @media sidebar (TypeError: this._target.tab is undefined)

Categories

(DevTools :: Style Editor, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open in a new tab:   data:text/html,<style>@media(min-width:1px){*{color:gray}}
2. Open about:debugging in a new tab
3. Find url from Step 1 in the list on page from step 2, click button "Debug" near that url
4. Switch to style editor in the tab opened in Step 3

AR:  No @media sidebar at the right
ER:  @media sidebar should appear at the right of style editor.
    (Reference: open style editor in tab from Step 1. It shows @media sidebar)
No longer blocks: 1277113
Component: Untriaged → Developer Tools: about:debugging
The following stack trace is logged when following the STRs from the summary :

A coding exception was thrown and uncaught in a Task.

Full message: TypeError: this._target.tab is undefined
Full stack: _updateMediaList/<@resource://devtools/client/styleeditor/StyleEditorUI.jsm:907:1
_run@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:311:39
process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11

When using about:debugging#tabs, the target is a remote TabTarget so it doesn't have a reference to a tab object.
This check is made in order to display a link that triggers resizes the viewport to match a media query (using RDM).

It only makes sense when using the StyleEditor from the toolbox, so we should simply add a check for !!this._target.tab before going further.

http://searchfox.org/mozilla-central/rev/b0e1da2a90ada7e00f265838a3fafd00af33e547/devtools/client/styleeditor/StyleEditorUI.jsm#907-915

Moving to StyleEditor.
Component: Developer Tools: about:debugging → Developer Tools: Style Editor
Priority: -- → P3
Product: Firefox → DevTools

I can see the media queries in the sidebar with STR from Comment 0

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.