Closed Bug 1403473 Opened 7 years ago Closed 7 years ago

about:url-classifier JS debug error for hashcompleter

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla58
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- wontfix
firefox57 + verified
firefox58 --- verified

People

(Reporter: tnguyen, Assigned: tnguyen)

References

Details

(Keywords: regression)

Attachments

(2 files)

Sometimes, it does not work for the first time, we have to disable then enable js log to show js log.
The reason is hashcompleter may be late initialized when it's really necessary.
Attachment #8912610 - Flags: review?(dlee)
Priority: -- → P3
Comment on attachment 8912610 [details]
Bug 1403473 - Init loggingEnable for hashcompleter

https://reviewboard.mozilla.org/r/183938/#review189490

::: toolkit/components/url-classifier/nsUrlClassifierHashCompleter.js:188
(Diff revision 1)
>    // A map of gethash URLs to next gethash time in miliseconds
>    this._nextGethashTimeMs = {};
>  
>    Services.obs.addObserver(this, "quit-application");
> +
> +  loggingEnabled = Services.prefs.getBoolPref(PREF_DEBUG_ENABLED);

could we just put this one with 'loggingEnabled' declaration ?
Attachment #8912610 - Flags: review?(dlee) → review+
Assignee: nobody → tnguyen
Status: NEW → ASSIGNED
Priority: P3 → P2
Comment on attachment 8912610 [details]
Bug 1403473 - Init loggingEnable for hashcompleter

https://reviewboard.mozilla.org/r/183938/#review189490

> could we just put this one with 'loggingEnabled' declaration ?

Thanks Dimi. loggingEnabled has global scope and I don't know if it works or we may have side effect (possible on startup). It is safe to put it in hashcompleter initilization
Pushed by tnguyen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a9862245514
Init loggingEnable for hashcompleter r=dimi
[Tracking Requested - why for this release]:
Blocks: 1297614
Keywords: regression
https://hg.mozilla.org/mozilla-central/rev/0a9862245514
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Hi Thomas, could you please nominate a patch for uplift to 57? Thanks!
Flags: needinfo?(tnguyen)
Attached patch Beta upliftSplinter Review
Approval Request Comment
[Feature/Bug causing the regression]: 1297614
[User impact if declined]: Sometimes the JS enable debug will not work for hashcompleter
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: 
1. Run FF from terminal (for example mac osx /Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin)
2. Enable browser.dom.window.dump.enabled and go to about:url-classifier
3. Update google4 list and click enable JS log
4. Access http://testsafebrowsing.appspot.com/s/phishing.html to see if you could see the page is blocked and check the terminal to see if there's "hashcompleter" keyword log
[List of other uplifts needed for the feature/fix]: No
[Is the change risky?]: No
[Why is the change risky/not risky?]: Initialize variable 
[String changes made/needed]: No
Flags: needinfo?(tnguyen)
Attachment #8913585 - Flags: approval-mozilla-beta?
Comment on attachment 8913585 [details] [diff] [review]
Beta uplift

Help debug, taking it.
Should be in 57b5
Attachment #8913585 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171005100211

This issue has been verified on latest Firefox Nightly Build ID: 20171005100211 on Windows 8.1 x64, Mac OS 10.12 and Ubuntu 14.04. The website is blocked and "hashcompleter" keyword is displayed in the terminal.

This issue has been also verified on latest Firefox Beta 57.0b5 (Build ID: 20171002181526).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: