Closed Bug 1308084 Opened 8 years ago Closed 8 years ago

nsChannelClassifier::ShouldEnableTrackingProtection has a very frequently failing NS_ENSURE_SUCCESS

Categories

(Toolkit :: Safe Browsing, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox52 --- wontfix
firefox53 --- fixed

People

(Reporter: dbaron, Assigned: francois)

Details

Attachments

(1 file)

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: nobody → francois
Status: NEW → ASSIGNED
Component: Tracking Protection → Safe Browsing
Flags: needinfo?(francois)
Priority: -- → P2
Product: Firefox → Toolkit
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 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+
Pushed by fmarier@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3b851a13d929
Silence noisy warning in nsChannelClassifier::ShouldEnableTrackingProtection(). r=gcp
https://hg.mozilla.org/mozilla-central/rev/3b851a13d929
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
I guess it will ride the train with 53.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: