Closed Bug 1288147 Opened 4 years ago Closed 4 years ago

Replace ownerGlobal with ownerDocument.defaultView in devtools frontend

Categories

(DevTools :: Framework, enhancement, P1)

46 Branch
enhancement

Tracking

(firefox50 fixed)

RESOLVED FIXED
Firefox 50
Iteration:
50.4 - Aug 1
Tracking Status
firefox50 --- fixed

People

(Reporter: bgrins, Assigned: tromey)

References

Details

(Whiteboard: [devtools-html])

Attachments

(2 files)

From https://bugzilla.mozilla.org/show_bug.cgi?id=1288071#c1:

I can't find any information about ownerGlobal in the DOM spec, and it seems available only on privileged pages (https://dxr.mozilla.org/mozilla-central/source/dom/webidl/EventTarget.webidl#61-67).

We're working towards running the devtools frontend in a content privileged window so we might end up having to remove the existing instances of ownerGlobal in favor of the more verbose ownerDocument.defaultView.  Don't need to worry about anything in devtools/server.

https://dxr.mozilla.org/mozilla-central/search?q=path%3Adevtools+ownerGlobal&redirect=false
Flags: qe-verify-
Priority: -- → P2
Whiteboard: [devtools-html][triage] → [devtools-html]
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
devtools/shared/event-parser.js is only used by the server, so can be ignored.
Maybe I should move it.

devtools/shared/webconsole/network-monitor.js also uses this but I think on a
code path only used on the server.
(In reply to Tom Tromey :tromey from comment #1)
> devtools/shared/event-parser.js is only used by the server, so can be
> ignored.
> Maybe I should move it.

Agreed

> devtools/shared/webconsole/network-monitor.js also uses this but I think on a
> code path only used on the server.

I'm currently splitting up shared/webconsole/utils.js (bug 1288475) and I expect we'll need to split network-monitor.js up as well so I just filed Bug 1289463 for that.  Makes sense to leave that file as-is if the only code path is on the server.
Iteration: --- → 50.4 - Aug 1
Priority: P2 → P1
Comment on attachment 8774804 [details]
Bug 1288147 - move event-parsers.js to devtools/server;

https://reviewboard.mozilla.org/r/67216/#review64086
Attachment #8774804 - Flags: review?(bgrinstead) → review+
Comment on attachment 8774805 [details]
Bug 1288147 - don't use ownerGlobal in devtools client code;

https://reviewboard.mozilla.org/r/67218/#review64088
Attachment #8774805 - Flags: review?(bgrinstead) → review+
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0869818632bb
move event-parsers.js to devtools/server; r=bgrins
https://hg.mozilla.org/integration/autoland/rev/be12f0a1b139
don't use ownerGlobal in devtools client code; r=bgrins
https://hg.mozilla.org/mozilla-central/rev/0869818632bb
https://hg.mozilla.org/mozilla-central/rev/be12f0a1b139
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.