Closed Bug 1011739 Opened 11 years ago Closed 2 years ago

ThirdPartyUtil::GetBaseDomain should stop emitting confusing warnings.

Categories

(Core :: Networking: Cookies, defect, P5)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: dmosedale, Assigned: dotoole)

References

Details

(Keywords: good-first-bug, Whiteboard: [necko-would-take])

Attachments

(2 files, 1 obsolete file)

Ran across this when implementing cookie injection on an about: page for Loop. ThirdPartyUtil::GetBaseDomain uses NS_ENSURE_TRUE to check whether something is a file: URI or not and return an appropriate nsresult: http://dxr.mozilla.org/mozilla-central/source/content/base/src/ThirdPartyUtil.cpp?from=ThirdPartyUtil.cpp&case=true#284 Those semantics are fine and entirely intentional, but it also spews out a confusing (and ultimately useless) warning to the console in the failure case, wasting developer time tracking it down and creating more noise that makes it easier to overlook console errors that are actually important.
Whiteboard: [necko-would-take][good first bug]
Priority: -- → P5

Hi I'm newbie here, and would like to work on this bug. Is this still open now?

The link you put looks already expired. Is it same as here?
https://dxr.mozilla.org/mozilla-central/source/dom/base/ThirdPartyUtil.cpp#403

Also, this bug can be solved by just removing this line NS_ENSURE_SUCCESS()?

Flags: needinfo?(dmose)
Keywords: good-first-bug
Whiteboard: [necko-would-take][good first bug] → [necko-would-take]

Sorry for not getting back to you sooner on this! Looks like :baku proposed a slightly different fix to the attached patch in phabricator, so updating to that and requesting review from him is probably the right next step.

Flags: needinfo?(dmosedale)
Severity: normal → S3
Assignee: nobody → dotoole
Status: NEW → ASSIGNED
Attachment #9332382 - Attachment description: Bug 1011739 - implemented Baku's suggested change r=baku → Bug 1011739 - Removed NS_ENSURE_SUCCESS to avoid showing confusing warning messages. r=baku
Attachment #9332414 - Attachment is obsolete: true

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.

Assignee: dotoole → nobody
Status: ASSIGNED → NEW
Assignee: nobody → dotoole
Status: NEW → ASSIGNED
Pushed by mbucher@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7d57f6f297d Removed NS_ENSURE_SUCCESS to avoid showing confusing warning messages. r=valentin
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Duplicate of this bug: 1582283
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: