Replace ownerDocument.defaultView with ownerGlobal

RESOLVED FIXED in Firefox 54

Status

()

Firefox
General
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: florian, Assigned: florian)

Tracking

53 Branch
Firefox 54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(3 attachments)

(Assignee)

Description

5 months ago
Created attachment 8830756 [details]
xpcshell script

We can simplify in most of the tree, with 2 exceptions:
- ownerGlobal isn't defined for non-privileged content code (the attached xpcshell script ignores .html and .xhtml files for this reason, and also a few .js files included by html tests)
- devtools/client (and so devtools/shared), see bug 1288071 comment 1 and bug 1288147.
(Assignee)

Comment 1

5 months ago
Created attachment 8830760 [details] [diff] [review]
changes made by hand

These can't be handled well by my script...
Attachment #8830760 - Flags: review?(jaws)
(Assignee)

Comment 2

5 months ago
Created attachment 8830761 [details] [diff] [review]
script-generated patch
Attachment #8830761 - Flags: review?(jaws)
(Assignee)

Comment 3

5 months ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=aeb0e44f6e9d
Attachment #8830760 - Flags: review?(jaws) → review+
Comment on attachment 8830761 [details] [diff] [review]
script-generated patch

Review of attachment 8830761 [details] [diff] [review]:
-----------------------------------------------------------------

It would be nice if we could have an eslint test for this, though I know the content vs chrome-privileged difference will make that harder to implement.

We could implement it as a rule, and then disable it for files where it doesn't exist, but that is also pretty noisy.
Attachment #8830761 - Flags: review?(jaws) → review+
(Assignee)

Comment 5

5 months ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8846a9720efc
(Assignee)

Comment 6

5 months ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b10f411c1481d136b7f07f928793c67b01950869
Bug 1334156 - replace ownerDocument.defaultView usages by hand in a few places, r=jaws.

https://hg.mozilla.org/integration/mozilla-inbound/rev/25c0a38d2d7ed50ed3c1d419f70c01595c481ae7
Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws.

Comment 7

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b10f411c1481
https://hg.mozilla.org/mozilla-central/rev/25c0a38d2d7e
Status: NEW → RESOLVED
Last Resolved: 5 months ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
(Assignee)

Updated

4 months ago
Depends on: 1338585
You need to log in before you can comment on or make changes to this bug.