Incorrect pref type and name used ImageBlockingPolicy

RESOLVED FIXED in Firefox 45

Status

()

Firefox for Android
General
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: nalexander, Assigned: jonalmeida)

Tracking

Trunk
Firefox 45
Points:
---

Firefox Tracking Flags

(firefox45 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

11-16 11:03:29.860  28735-28771/org.mozilla.fennec_nalexander E/GeckoConsole´╣Ľ [JavaScript Error: "NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]" {file: "jar:jar:file:///data/app/org.mozilla.fennec_nalexander-1.apk!/assets/omni.ja!/components/ImageBlockingPolicy.js" line: 106}]

The underlying code looks confused: there are multiple references to "browser.image_blocking.enabled", which looks wrong.  See https://dxr.mozilla.org/mozilla-central/search?q=image_blocking&case=true.

Updated

2 years ago
tracking-fennec: --- → ?
(Assignee)

Comment 1

2 years ago
You're right, the issue is the wrong pref value which removed .enabled.
Assignee: nobody → jonalmeida942
(Assignee)

Comment 2

2 years ago
My telemetry patch overwrote the new pref value in ImageBlockingPolicy.js.

Should be a simple fix; will do it now.
(Assignee)

Updated

2 years ago
Summary: "NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]" {file: "jar:jar:file:///data/app/org.mozi → Incorrect pref type and name used ImageBlockingPolicy
(Assignee)

Comment 3

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4e0479e8e1b3
(Assignee)

Comment 4

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f6c08b66bc6c
(Assignee)

Comment 5

2 years ago
Created attachment 8688082 [details]
MozReview Request: Bug 1225225 - Incorrect pref type and name used ImageBlockingPolicy r?mfinkle

Bug 1225225 - Incorrect pref type and name used ImageBlockingPolicy r?mfinkle
Attachment #8688082 - Flags: review?(mark.finkle)
Comment on attachment 8688082 [details]
MozReview Request: Bug 1225225 - Incorrect pref type and name used ImageBlockingPolicy r?mfinkle

https://reviewboard.mozilla.org/r/25277/#review22773

::: mobile/android/components/ImageBlockingPolicy.js:23
(Diff revision 1)
> -const PREF_IMAGEBLOCKING_ENABLED = "browser.image_blocking.enabled";
> +const PREF_IMAGEBLOCKING_ENABLED = "browser.image_blocking";

PREF_IMAGEBLOCKING_ENABLED -> PREF_IMAGEBLOCKING

::: mobile/android/components/ImageBlockingPolicy.js:95
(Diff revision 1)
>      return Services.prefs.getIntPref("browser.image_blocking");

Use the constant here

::: mobile/android/components/ImageBlockingPolicy.js:100
(Diff revision 1)
>        Services.telemetry.getHistogramById(TELEMETRY_TAP_TO_LOAD_ENABLED).add(getEnabled());

Use this.\_enabled() here

::: mobile/android/components/ImageBlockingPolicy.js:105
(Diff revision 1)
>  function getEnabled() {

Remove this method
Attachment #8688082 - Flags: review?(mark.finkle)
(Assignee)

Updated

2 years ago
Attachment #8688082 - Flags: review?(mark.finkle)
(Assignee)

Comment 7

2 years ago
Comment on attachment 8688082 [details]
MozReview Request: Bug 1225225 - Incorrect pref type and name used ImageBlockingPolicy r?mfinkle

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/25277/diff/1-2/
Comment on attachment 8688082 [details]
MozReview Request: Bug 1225225 - Incorrect pref type and name used ImageBlockingPolicy r?mfinkle

https://reviewboard.mozilla.org/r/25277/#review22785

LGTM
Attachment #8688082 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 9

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/2feb5677ea5cedb035700076148065deb08fb3aa
Bug 1225225 - Incorrect pref type and name used ImageBlockingPolicy r=mfinkle

Comment 10

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2feb5677ea5c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox45: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.