If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

1,100 instances of "NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80070057" emitted from dom/base/nsContentUtils.cpp during linux64 debug testing

RESOLVED FIXED in Firefox 54

Status

()

Core
DOM
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: erahm, Assigned: erahm)

Tracking

(Blocks: 1 bug)

Trunk
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

> 1149 WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80070057: file dom/base/nsContentUtils.cpp, line 6163

This warning [1] shows up in the following test suites:

>    243 - test-linux64/debug-mochitest-browser-chrome-e10s-2 bc2
>    243 - test-linux64/debug-mochitest-browser-chrome-10 bc10
>    243 - test-linux64/debug-mochitest-browser-chrome-e10s-10 bc10
>    232 - test-linux64/debug-mochitest-e10s-10 10
>    116 - test-linux64/debug-mochitest-10 10
>     45 - test-linux64/debug-mochitest-chrome-3 c3
>      4 - test-linux64/debug-mochitest-media mda
>      4 - test-linux64/debug-mochitest-media-e10s mda
>      4 - test-linux64/debug-mochitest-devtools-chrome-e10s-3 dt3
>      4 - test-linux64/debug-mochitest-devtools-chrome-9 dt9
>      3 - test-linux64/debug-mochitest-browser-chrome-4 bc4
>      3 - test-linux64/debug-mochitest-browser-chrome-e10s-1 bc1
>      2 - test-linux64/debug-gtest GTest
>      1 - test-linux64/debug-mochitest-e10s-1 1
>      1 - test-linux64/debug-mochitest-1 1
>      1 - test-linux64/debug-mochitest-jetpack JP

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

>     18 - [e10s] browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
>     18 -        browser/components/extensions/test/browser/browser_ext_browserAction_popup.js
>     18 - [e10s] browser/components/extensions/test/browser/test-oop-extensions/browser_ext_browserAction_popup.js
>     17 - [e10s] toolkit/components/extensions/test/mochitest/test-oop-extensions/test_ext_webrequest_auth.html
>     17 - [e10s] toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
>     17 -        toolkit/components/extensions/test/mochitest/test_ext_webrequest_auth.html
>      9 - [e10s] browser/components/extensions/test/browser/test-oop-extensions/browser_ext_tabs_executeScript_good.js
>      9 - [e10s] browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js
>      9 -        browser/components/extensions/test/browser/browser_ext_tabs_executeScript_good.js
>      8 -        toolkit/components/extensions/test/mochitest/test_chrome_ext_identity.html

[1] https://hg.mozilla.org/mozilla-central/annotate/b47946b2076f/dom/base/nsContentUtils.cpp#l6163
This easily reproduces with:

> ./mach mochitest browser/components/extensions/test/browser/browser_ext_browserAction_popup.js

The warning appears to happen because we're trying to call |nsContentTypeParser::GetType| on a |nsContentTypeParser| that has an empty |mString| member.

Example callstack:

> * thread #1: tid = 0x7d0ff1, 0x0000000103458f69 XUL`nsContentTypeParser::GetType(this=0x00007fff5fbfc968, aResult=0x00007fff5fbfc738) const + 137 at nsContentUtils.cpp:6180, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
>   * frame #0: 0x0000000103458f69 XUL`nsContentTypeParser::GetType(this=0x00007fff5fbfc968, aResult=0x00007fff5fbfc738) const + 137 at nsContentUtils.cpp:6180 [opt]
>     frame #1: 0x0000000105daf506 XUL`AddonContentPolicy::ShouldLoad(this=<unavailable>, aContentType=<unavailable>, aContentLocation=<unavailable>, aRequestOrigin=0x000000012e70e140, aContext=0x000000012f8b0040, aMimeTypeGuess=<unavailable>, aExtra=0x0000000000000000, aRequestPrincipal=0x0000000122d0f280, aShouldLoad=0x00007fff5fbfccde) + 406 at AddonContentPolicy.cpp:129 [opt]
>     frame #2: 0x00000001035c046f XUL`nsContentPolicy::CheckPolicy(this=0x00000001014dc0b0, policyMethod=19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, simplePolicyMethod=19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00, contentType=<unavailable>, contentLocation=<unavailable>, requestingLocation=0x000000012e70e140, requestingContext=<unavailable>, mimeType=<unavailable>, extra=<unavailable>, requestPrincipal=<unavailable>, decision=<unavailable>)(unsigned int, nsIURI*, nsIURI*, nsISupports*, nsACString_internal const&, nsISupports*, nsIPrincipal*, short*), nsresult (nsISimpleContentPolicy::*)(unsigned int, nsIURI*, nsIURI*, nsIDOMElement*, bool, nsACString_internal const&, nsISupports*, nsIPrincipal*, short*), unsigned int, nsIURI*, nsIURI*, nsISupports*, nsACString_internal const&, nsISupports*, nsIPrincipal*, short*) + 1935 at nsContentPolicy.cpp:140 [opt]
>     frame #3: 0x00000001035bfaef XUL`nsContentPolicy::ShouldLoad(this=0x00000001014dc0b0, contentType=23, contentLocation=<unavailable>, requestingLocation=<unavailable>, requestingContext=<unavailable>, mimeType=0x00007fff5fbfcce0, extra=<unavailable>, requestPrincipal=<unavailable>, decision=<unavailable>) + 175 at nsContentPolicy.cpp:239 [opt]
>     frame #4: 0x000000010339eca1 XUL`NS_CheckContentLoadPolicy(contentType=23, contentLocation=<unavailable>, originPrincipal=0x0000000122d0f280, context=<unavailable>, mimeType=<unavailable>, extra=0x0000000000000000, decision=<unavailable>, policyService=<unavailable>, aSecMan=<unavailable>) + 1217 at nsContentPolicyUtils.h:238 [opt]
>     frame #5: 0x00000001036b5a49 XUL`nsScriptLoader::CheckContentPolicy(aDocument=<unavailable>, aContext=0x000000012f8b0040, aURI=0x000000012e70ebe0, aType=0x00007fff5fbfce08, aIsPreLoad=<unavailable>) + 281 at nsScriptLoader.cpp:630 [opt]
>     frame #6: 0x00000001036afda1 XUL`nsScriptLoader::ProcessScriptElement(this=<unavailable>, aElement=<unavailable>) + 4337 at nsScriptLoader.cpp:1500 [opt]
Created attachment 8832182 [details] [diff] [review]
Stop warning if content type is emtpy

jya, it looks like you added this warning in bug 1230353. I propose just
returning the failure and not warning like we used to.
Attachment #8832182 - Flags: review?(jyavenard)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
(In reply to Eric Rahm [:erahm] from comment #2)
> Created attachment 8832182 [details] [diff] [review]
> Stop warning if content type is emtpy
> 
> jya, it looks like you added this warning in bug 1230353. I propose just
> returning the failure and not warning like we used to.

patch content doesn't show un bugzilla
Attachment #8832182 - Flags: review?(jyavenard) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/af90aaf9dec264f8d472a2eb8eb70d154b4c637e
Bug 1335477 - Stop warning if content type is emtpy. r=jya

Comment 5

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/af90aaf9dec2
Status: ASSIGNED → RESOLVED
Last Resolved: 8 months ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.