Closed Bug 555692 Opened 10 years ago Closed 10 years ago

mEnabled is never used in CSPService

Categories

(Core :: DOM: Core & HTML, defect, trivial)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 file)

Defined as a variable in:

    * content/base/src/nsCSPService.h (View Hg log or Hg annotations)
          o line 56 -- PRBool mEnabled; 

Referenced in: 
<crickets>
Attached patch remove itSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #435589 - Flags: review?
Attachment #435589 - Flags: review? → review?(dveditz)
Although useless now I'm pretty sure we've got a patch somewhere that connects mEnabled with a global-disabling pref. For whatever reason users might not want the site breakage introduced by CSP (for instance, if they are greasemonkey users and we don't implement a more refined way for addons to loosen restrictions).
Attachment #435589 - Flags: review?(dveditz) → review?(bsterne)
Comment on attachment 435589 [details] [diff] [review]
remove it

dveditz is right.  We're not using it now, but we plan to hook it up to the pref service later so that extensions and such could turn it off if they want to.  I think this is WONTFIX, but I'll wait for :geekboy to confirm that.
Attachment #435589 - Flags: review?(bsterne) → review-
I think we should remove the unused variable. 

nsCSPService.cpp:52 has a similar variable that is actually hooked up to a pref to do this, and I don't recall why a copy was in the .h file too.
Comment on attachment 435589 [details] [diff] [review]
remove it

In that case, r=bsterne for timeless' patch.
Attachment #435589 - Flags: review- → review+
http://hg.mozilla.org/mozilla-central/rev/af2804c794ec
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.