Closed
Bug 1317990
Opened 7 years ago
Closed 7 years ago
Remove Event::IsChrome
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
17.17 KB,
patch
|
smaug
:
review+
bkelly
:
review+
|
Details | Diff | Splinter Review |
We should use CallerType instead.
![]() |
Assignee | |
Comment 1•7 years ago
|
||
Ben, could you look at the serviceworker bits?
Attachment #8811300 -
Flags: review?(bugs)
Attachment #8811300 -
Flags: review?(bkelly)
Comment 2•7 years ago
|
||
Comment on attachment 8811300 [details] [diff] [review] Remove Event::IsChrome in favor of passing CallerType arguments Review of attachment 8811300 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comments addressed. ::: dom/workers/ServiceWorkerEvents.cpp @@ +772,5 @@ > mPromises.AppendElement(&aArg); > } > > void > +FetchEvent::PreventDefault(JSContext* aCx, CallerType aCallerType) You could actually assert this is not a system caller. We explicitly don't support system principal service workers. But I guess probably not necessary. ::: dom/workers/ServiceWorkerEvents.h @@ +6,5 @@ > > #ifndef mozilla_dom_workers_serviceworkerevents_h__ > #define mozilla_dom_workers_serviceworkerevents_h__ > > +#include "mozilla/dom/BindingDeclarations.h" nit: This header should not be needed here. The signature is defined in the parent class. ::: dom/workers/ServiceWorkerPrivate.cpp @@ +1542,5 @@ > + // one? The former lies about cases when system code (e.g. default > + // handling) does the preventDefault and claims default was _not_ > + // prevented... Keep calling the "scriptable" one for now. > + CallerType callerType = aWorkerPrivate->UsesSystemPrincipal() ? > + CallerType::System : CallerType::NonSystem; Please just MOZ_ASSERT(!aWorkerPrivate->UsesSystemPrincipal()) and pass CallerType::NonSystem. We don't allow system principal service workers and have no plans to add them. I think this means the XXX comment can go as well?
Attachment #8811300 -
Flags: review?(bkelly) → review+
Updated•7 years ago
|
Attachment #8811300 -
Flags: review?(bugs) → review+
![]() |
Assignee | |
Comment 3•7 years ago
|
||
> I think this means the XXX comment can go as well?
Yes. Applied the other review comments.
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/482ed3f75e5b Remove Event::IsChrome in favor of passing CallerType arguments. r=smaug,bkelly
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/482ed3f75e5b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•