Remove the release-mode IsCallerChrome assertions from nsDOMWindowUtils

RESOLVED FIXED in Firefox 44

Status

()

Core
DOM
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: bholley, Unassigned)

Tracking

unspecified
mozilla44
Points:
---

Firefox Tracking Flags

(firefox44 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
I think it's time for these things to go away. Many of these methods have infrequently-used C++ callers, and it doesn't seem worth converting all of them to LegacyIsCallerChromeOrNativeCode.

See https://crash-stats.mozilla.com/report/index/b07e8ec3-2344-4f8b-8761-8cacc2150927 and similar.
(Reporter)

Comment 1

2 years ago
Created attachment 8668274 [details] [diff] [review]
Remove the release-mode IsCallerChrome assertions from nsDOMWindowUtils. v1
Attachment #8668274 - Flags: review?(bzbarsky)
I thought we were waiting on XPConnect not being exposed to the web, so we're very sure that this stuff is not ever being touched by content, before doing this?
Flags: needinfo?(bobbyholley)
(Reporter)

Comment 3

2 years ago
(In reply to Boris Zbarsky [:bz] from comment #2)
> I thought we were waiting on XPConnect not being exposed to the web, so
> we're very sure that this stuff is not ever being touched by content, before
> doing this?

I kinda-sorta shifted my opinion to deciding that it probably doesn't matter. There's no classinfo for DOMWindowUtils anywhere, which means that we'll refuse to create a reflector for it in any content scope, even if chrome explicitly passes it to content (I just tested this to be extra sure).

So I more or less decided that there's no particular reason why we should be worried about that. But I'm also totally fine to be safe and just replace all of these to LegacyIsCallerChromeOrNativeCode. Your call.
Flags: needinfo?(bobbyholley)
Comment on attachment 8668274 [details] [diff] [review]
Remove the release-mode IsCallerChrome assertions from nsDOMWindowUtils. v1

r=me
Attachment #8668274 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/63496344479e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.