gPrivacyPane is not defined

RESOLVED INVALID

Status

()

Firefox
Preferences
RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: mmc, Assigned: mmc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When running ./mach mochitest browser/components/preferences/tests/browser_cookies_exceptions.js I get the following error, introduced by https://hg.mozilla.org/mozilla-central/rev/11ac1ea74328.

I suggest we simplify this code by getting rid of #ifdef NIGHTLY in privacy.js and always defining privacy.trackingprotection.ui.enabled and browser.polaris.enabled, which can default to false in non-Nightly builds.

JavaScript error: chrome://browser/content/preferences/privacy.js, line 20: SyntaxError: illegal character
3 INFO Console message: [JavaScript Error: "SyntaxError: illegal character" {file: "chrome://browser/content/preferences/privacy.js" line: 20 column: 0 source: "#ifdef NIGHTLY_BUILD
"}]
4 INFO Console message: [JavaScript Error: "gPrivacyPane is not defined" {file: "chrome://global/content/bindings/preferences.xml line 419 > Function" line: 1}]
5 INFO Console message: [JavaScript Error: "gPrivacyPane is not defined" {file: "chrome://global/content/bindings/preferences.xml line 419 > Function" line: 1}]
6 INFO Console message: [JavaScript Error: "gPrivacyPane is not defined" {file: "chrome://global/content/bindings/preferences.xml line 419 > Function" line: 1}]
7 INFO Console message: [JavaScript Error: "gPrivacyPane is not defined" {file: "chrome://global/content/bindings/preferences.xml line 747 > Function" line: 1}]
JavaScript error: chrome://browser/content/preferences/preferences.xul, line 1: ReferenceError: gPrivacyPane is not defined
JavaScript error: chrome://browser/content/preferences/preferences.xul, line 1: ReferenceError: gPrivacyPane is not defined
Flags: needinfo?(gavin.sharp)
Blocks: 1081343
(In reply to [:mmc] Monica Chew (please use needinfo) from comment #0)
> When running ./mach mochitest
> browser/components/preferences/tests/browser_cookies_exceptions.js I get the
> following error, introduced by
> https://hg.mozilla.org/mozilla-central/rev/11ac1ea74328.

Do you mean http://hg.mozilla.org/mozilla-central/diff/42a1ca26cbf9/browser/components/preferences/privacy.js ?

> JavaScript error: chrome://browser/content/preferences/privacy.js, line 20:
> SyntaxError: illegal character
> 3 INFO Console message: [JavaScript Error: "SyntaxError: illegal character"
> {file: "chrome://browser/content/preferences/privacy.js" line: 20 column: 0
> source: "#ifdef NIGHTLY_BUILD
> "}]

This suggests your privacy.js is not being preprocessed somehow, which would be strange. Are you sure you rebuilt correctly?
Flags: needinfo?(gavin.sharp)
I am not sure, but this is from a try run for another bug:

https://tbpl.mozilla.org/php/getParsedLog.php?id=52384626&tree=Try#error2
Created attachment 8521548 [details] [diff] [review]
Remove ifdef NIGHTLYs from privacy preferences
Assignee: nobody → mmc
Status: NEW → ASSIGNED
Hmm, clobber build seems to have fixed the problem. Don't know why.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
Duh, this was failing because of a change that I made in browser/components/preferences/jar.mn because the change that I was testing removed all ifdefs from privacy.js, prior to the polaris bug. Sorry for the noise.
You need to log in before you can comment on or make changes to this bug.