Allow combining different gczeal/zealMode values

RESOLVED FIXED in Firefox 47

Status

()

RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla47
Points:
---

Firefox Tracking Flags

(firefox47 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Currently zealMode is a single value that can be set with gczeal(x). Looking at our zeal values, it might be interesting to combine some of those modes.

I think we can do that with minimal changes to tests and code if we use a bit for each mode, for instance gczeal(x) would no longer do |zealMode = x| but |zealMode ^= (1 << x)|.

gczeal(0) is a special case: it'd simply clear all bits.
(Assignee)

Comment 1

3 years ago
I'll try to prototype this quickly to see if it works.
Flags: needinfo?(jdemooij)
(Assignee)

Comment 2

3 years ago
Created attachment 8715720 [details] [diff] [review]
Patch

This adds an enum class for the zeal values and GCRuntime::hasZealMode to check if a zeal mode is active. Passes all shell tests.
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Attachment #8715720 - Flags: review?(terrence)
Comment on attachment 8715720 [details] [diff] [review]
Patch

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

This is GREAT! I've been meaning to do something like this for ages.

The next step I'd like to see is to have setZeal take a string instead of an integer so that people will stop asking what mode does what.
Attachment #8715720 - Flags: review?(terrence) → review+
Depends on: 1238815

Comment 7

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e2fa804302c9
https://hg.mozilla.org/mozilla-central/rev/9756e7631ad9
https://hg.mozilla.org/mozilla-central/rev/a25fd5f06b68
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
(Assignee)

Updated

3 years ago
No longer depends on: 1238815

Updated

2 years ago
Depends on: 1300893
You need to log in before you can comment on or make changes to this bug.