Closed Bug 1184275 Opened 5 years ago Closed 4 years ago

4,300 instances of "NS_ENSURE_TRUE(isFileURI) failed" and associated warnings emitted from dom/base/ThirdPartyUtil.cpp

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

> 1503 [NNNNN] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file dom/base/ThirdPartyUtil.cpp, line 370
> 1428 [NNNNN] WARNING: NS_ENSURE_SUCCESS(result, result) failed with result 0x80070057: file docshell/base/nsDocShell.cpp, line 14059
> 1428 [NNNNN] WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x80070057: file netwerk/protocol/http/HttpBaseChannel.cpp, line 2092

The 1428 instances of 'NS_ENSURE_SUCCESS(result, result)' and 'NS_ENSURE_SUCCESS(rv, false)' all follow the ThirdPartyUtil error in the above order implying a call chain of:
> HttpBaseChannel::ShouldIntercept -> nsDocShell::ShouldPrepareForIntercept -> ThirdPartyUtil::GetBaseDomain

Where each location logs the same error (NS_ERROR_INVALID_ARG). It feels like we should just not warn in the INVALID_ARG case as this is expected behavior and is handled properly.

These warnings [1,2,3] show up in the following test suites:

> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-1-bm68-tests1-linux64-build0.txt:370
> mozilla-central_ubuntu64_vm-debug_test-reftest-2-bm53-tests1-linux64-build27.txt:226
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-2-bm123-tests1-linux64-build2.txt:205
> mozilla-central_ubuntu64_vm-debug_test-reftest-1-bm54-tests1-linux64-build2.txt:146
> mozilla-central_ubuntu64_vm-debug_test-reftest-4-bm121-tests1-linux64-build1.txt:129
> mozilla-central_ubuntu64_vm-debug_test-reftest-3-bm52-tests1-linux64-build0.txt:101
> mozilla-central_ubuntu64_vm-debug_test-mochitest-devtools-chrome-2-bm120-tests1-linux64-build0.txt:69
> mozilla-central_ubuntu64_vm-debug_test-mochitest-browser-chrome-2-bm117-tests1-linux64-build8.txt:59
> mozilla-central_ubuntu64_vm-debug_test-mochitest-3-bm115-tests1-linux64-build21.txt:26
> mozilla-central_ubuntu64_vm-debug_test-mochitest-1-bm117-tests1-linux64-build1.txt:26
> mozilla-central_ubuntu64_vm-debug_test-mochitest-browser-chrome-1-bm122-tests1-linux64-build19.txt:25
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-browser-chrome-1-bm53-tests1-linux64-build0.txt:21
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-browser-chrome-3-bm118-tests1-linux64-build0.txt:18
> mozilla-central_ubuntu64_vm-debug_test-mochitest-other-bm53-tests1-linux64-build0.txt:13
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-1-bm123-tests1-linux64-build25.txt:10
> mozilla-central_ubuntu64_vm-debug_test-mochitest-browser-chrome-3-bm122-tests1-linux64-build17.txt:10
> mozilla-central_ubuntu64_vm-debug_test-mochitest-devtools-chrome-3-bm115-tests1-linux64-build9.txt:9
> mozilla-central_ubuntu64_vm-debug_test-crashtest-bm53-tests1-linux64-build28.txt:8
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-browser-chrome-2-bm67-tests1-linux64-build0.txt:6
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-5-bm52-tests1-linux64-build2.txt:5
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-3-bm51-tests1-linux64-build0.txt:5
> mozilla-central_ubuntu64_vm-debug_test-mochitest-5-bm115-tests1-linux64-build29.txt:5
> mozilla-central_ubuntu64_vm-debug_test-mochitest-devtools-chrome-1-bm52-tests1-linux64-build11.txt:4
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-2-bm53-tests1-linux64-build12.txt:2
> mozilla-central_ubuntu64_vm-debug_test-mochitest-2-bm67-tests1-linux64-build1.txt:2
> mozilla-central_ubuntu64_vm-debug_test-mochitest-jetpack-bm123-tests1-linux64-build2.txt:1
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-4-bm122-tests1-linux64-build12.txt:1
> mozilla-central_ubuntu64_vm-debug_test-mochitest-4-bm121-tests1-linux64-build0.txt:1

It shows up in 597 tests. A few of the most prevalent:

> 21 - dom/security/test/cors/test_CrossSiteXHR_origin.html
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-9x9.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-8x8.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-7x7.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-6x6.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-5x5.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-4x4.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-3x3.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-33x33.png
> 16 - file:///builds/slave/test/build/tests/reftest/tests/image/test/reftest/encoders-lossless/size-32x32.png

I have confirmed locally it reproduces in |image/test/reftest/encoders-lossless/size-32x32.png|.

[1] https://hg.mozilla.org/mozilla-central/annotate/49683d4e9ebd/dom/base/ThirdPartyUtil.cpp#l370
[2] https://hg.mozilla.org/mozilla-central/annotate/49683d4e9ebd/docshell/base/nsDocShell.cpp#l14076
[3] https://hg.mozilla.org/mozilla-central/annotate/49683d4e9ebd/netwerk/protocol/http/HttpBaseChannel.cpp#l2092
Blocks: logspam
This error is handled properly and appears to happen due to legitimate usage.
The warnings are updated to just return the proper error code.

Jonas, it looks like you were the original reviewer of the ThirdPartyUtil code,
would you mind reviewing?
Attachment #8634350 - Flags: review?(jonas)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Comment on attachment 8634350 [details] [diff] [review]
Remove warnings that URI is not a file URI

Jason would you mind reviewing this?
Attachment #8634350 - Flags: review?(jonas) → review?(jduell.mcbugs)
Attachment #8634350 - Flags: review?(jduell.mcbugs) → review+
url:        https://hg.mozilla.org/integration/mozilla-inbound/rev/971e7c0f083ed1ee6d511a37e4b04aec1896db0a
changeset:  971e7c0f083ed1ee6d511a37e4b04aec1896db0a
user:       Eric Rahm <erahm@mozilla.com>
date:       Thu Jul 23 11:03:25 2015 -0700
description:
Bug 1184275 - Remove warnings that URI is not a file URI. r=jduell

This error is handled properly and appears to happen due to legitimate usage.
The warnings are updated to just return the proper error code.
https://hg.mozilla.org/mozilla-central/rev/971e7c0f083e
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.