nsChannelClassifier::ShouldEnableTrackingProtection has a very frequently failing NS_ENSURE_SUCCESS

RESOLVED FIXED in Firefox 53

Status

()

Toolkit
Safe Browsing
P2
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: dbaron, Assigned: francois)

Tracking

Trunk
mozilla53
Points:
---

Firefox Tracking Flags

(firefox52 wontfix, firefox53 fixed)

Details

MozReview Requests

()

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

Attachments

(1 attachment)

The most frequently failing NS_ENSURE_SUCCESS starting up Firefox and restoring my session is:

WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004002: file /home/dbaron/builds/ssd/mozilla-central/mozilla/netwerk/base/nsChannelClassifier.cpp, function ShouldEnableTrackingProtection, line 81


Line 81 is:

    nsCOMPtr<nsIHttpChannelInternal> chan = do_QueryInterface(aChannel, &rv);
    NS_ENSURE_SUCCESS(rv, rv);


Presumably this fails whenever the channel is non-HTTP (e.g., file, about:, etc.?).  I didn't check this, though.

Perhaps this should be using a test that doesn't spam the console in this case, e.g.:

  if (NS_FAILED(rv)) {
    return rv;
  }

(or maybe even an NS_OK return value?).
Flags: needinfo?(francois)
(Assignee)

Updated

2 years ago
Assignee: nobody → francois
Status: NEW → ASSIGNED
Component: Tracking Protection → Safe Browsing
Flags: needinfo?(francois)
Priority: -- → P2
Product: Firefox → Toolkit
(Assignee)

Comment 1

2 years ago
Do you have a good way to reproduce this?

I tried (using my main profile):

1. starting Firefox and opening two tabs
2. killing Firefox
3. starting Firefox again and restoring the tabs

and I didn't see that warning anywhere on the terminal.

I could probably just remove the warning since we're not really looking at it, but I'm curious to see the kinds of URLs that are failing to return a channel. I would ideally like to make sure there's nothing we care about in there.
Flags: needinfo?(dbaron)
Every time, the URL was about:blank.

My debugging patch was https://hg.mozilla.org/users/dbaron_mozilla.com/patches/raw-file/028ae685363f/debug-1308084

I think the warnings were printed pretty early in session restoration -- it seemed like one warning per tab being restored, and long before we try to load the actual page into any of those tabs.
Flags: needinfo?(dbaron)
It may also be relevant that I have the pref privacy.trackingprotection.enabled set to true, and browser.startup.page set to 3.
Comment hidden (mozreview-request)

Comment 5

2 years ago
mozreview-review
Comment on attachment 8809712 [details]
Bug 1308084 - Silence noisy warning in nsChannelClassifier::ShouldEnableTrackingProtection().

https://reviewboard.mozilla.org/r/92256/#review93188
Attachment #8809712 - Flags: review?(gpascutto) → review+

Comment 6

2 years ago
Pushed by fmarier@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b851a13d929
Silence noisy warning in nsChannelClassifier::ShouldEnableTrackingProtection(). r=gcp

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3b851a13d929
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
I guess it will ride the train with 53.
status-firefox52: affected → wontfix
You need to log in before you can comment on or make changes to this bug.