12,200 instances of WARNING: NS_ENSURE_TRUE(nsContentUtils::IsJavascriptMIMEType(type) || type.LowerCaseEqualsASCII("module") || type.LowerCaseEqualsASCII("importmap")) failed from ScriptElement.cpp during linux64 debug testing
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: erahm, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
Comment hidden (obsolete) |
Reporter | ||
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Reporter | ||
Comment 4•8 years ago
|
||
Reporter | ||
Comment 5•8 years ago
|
||
Updated•8 years ago
|
Reporter | ||
Comment 6•8 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Reporter | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Reporter | ||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Reporter | ||
Comment 13•8 years ago
|
||
Reporter | ||
Comment 14•8 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Comment 15•7 years ago
|
||
Updated•6 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 16•4 months ago
|
||
It looks like the warning related to nsContentUtils::IsJavascriptMIMEType() has migrated again, to ScriptElement::MaybeProcessScript().
12,200 instances of "WARNING: NS_ENSURE_TRUE(nsContentUtils::IsJavascriptMIMEType(type) || type.LowerCaseEqualsASCII("module") || type.LowerCaseEqualsASCII("importmap")) failed: file dom/script/ScriptElement.cpp:163" emitted from none during linux1804-64-qr debug testing
12232 WARNING: NS_ENSURE_TRUE(nsContentUtils::IsJavascriptMIMEType(type) || type.LowerCaseEqualsASCII("module") || type.LowerCaseEqualsASCII("importmap")) failed: file dom/script/ScriptElement.cpp:163
This warning [1] shows up in the following test suites:
542 - test-linux1804-64-qr/debug-mochitest-webgl1-ext-nofis gl1e
542 - test-linux1804-64-qr/debug-mochitest-webgl1-ext-swr gl1e
542 - test-linux1804-64-qr/debug-mochitest-webgl1-ext-swr-nofis gl1e
542 - test-linux1804-64-qr/debug-mochitest-webgl1-ext-gli gl1e
542 - test-linux1804-64-qr/debug-mochitest-webgl1-ext gl1e
510 - test-linux1804-64-qr/debug-mochitest-webgl2-core-swr gl2c
510 - test-linux1804-64-qr/debug-mochitest-webgl2-core-nofis gl2c
510 - test-linux1804-64-qr/debug-mochitest-webgl2-core-gli gl2c
510 - test-linux1804-64-qr/debug-mochitest-webgl2-core-swr-nofis gl2c
510 - test-linux1804-64-qr/debug-mochitest-webgl2-core gl2c
408 - test-linux1804-64-qr/debug-mochitest-webgl1-core gl1c
408 - test-linux1804-64-qr/debug-mochitest-webgl1-core-nofis gl1c
408 - test-linux1804-64-qr/debug-mochitest-webgl1-core-gli gl1c
408 - test-linux1804-64-qr/debug-mochitest-webgl1-core-swr gl1c
408 - test-linux1804-64-qr/debug-mochitest-webgl1-core-swr-nofis gl1c
[...]
It shows up in 950 tests. A few of the most prevalent:
250 - dom/canvas/test/webgl-conf/generated/test_2_conformance__context__context-release-upon-reload.html
250 - dom/canvas/test/webgl-conf/generated/test_2_conformance__context__context-release-with-workers.html
250 - dom/canvas/test/webgl-conf/generated/test_conformance__context__context-release-upon-reload.html
250 - dom/canvas/test/webgl-conf/generated/test_conformance__context__context-release-with-workers.html
154 - parser/htmlparser/tests/mochitest/test_html5_tree_construction.html
130 - /html/semantics/scripting-1/the-script-element/script-type-and-language-js-svg.svg
130 - /html/semantics/scripting-1/the-script-element/script-type-and-language-js-xhtml.xhtml
130 - /html/semantics/scripting-1/the-script-element/script-type-and-language-js.html
110 - dom/canvas/test/webgl-conf/generated/test_2_conformance2__glsl3__bool-type-cast-bug-uint-ivec-uvec.html
100 - dom/canvas/test/webgl-conf/generated/test_2_conformance__glsl__bugs__bool-type-cast-bug-int-float.html
[1] https://hg.mozilla.org/mozilla-central/annotate/99a425a15992bd6c756462854861e61c6a1785f2/none#l0
Assignee | ||
Comment 17•4 months ago
|
||
Given that the overwhelming majority of these errors are in the WebGL1 and WebGL2 test suites, my guess is that the test suite is doing something incorrectly that is causing these errors to happen.
Assignee | ||
Comment 18•4 months ago
|
||
emk's point in comment 25 that it doesn't make sense to warn when a web page is missing a tag (I guess that's what the warning is for?) sounds reasonable to me. Are we expecting that web developers are browsing using debug builds? Surely not.
Assignee | ||
Comment 19•4 months ago
|
||
I wrote a little patch to improve this error message, so it actually includes the type. I'll file a separate bug for that. Anyways, with that patch I ran the test_2_conformance__context__context-release-upon-reload.html test. It looks like the unknown script types are "x-shader/x-vertex" and "x-shader/x-fragment". According to an answer I found on Stack Overflow, it sounds like it is a WebGL convention to stuff random strings they need into script tags using these deliberately-invalid values. Given the convention, it might be worth skipping the warning for these specific values. I dunno how many variants there might be.
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 20•4 months ago
|
||
This patch changes the invalid script tag warning to actually include the
invalid tag, which makes it easier to understand what is going wrong.
WebGL pages use invalid types on script elements to store strings. These three
specific strings are used in hundreds of places in our WebGL tests, so don't
warn for them. The first two can be found in WebGL tutorials, so this seems like
an actual convention. "text/something-not-javascript" looks like it is only
used in the WebGL conformance tests, but it is clearly deliberately invalid
so skip warning for it, too, in the interests of reducing warning spam.
I didn't use NS_WARNING_ASSERTION here because that includes the entire
expression that failed, and that is large and not very useful.
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 21•4 months ago
|
||
I think my patch will eliminate at least 90% of these warnings, and for any remainders, the message will change to include the actual invalid script tag, so this bug can be closed when my patch lands. If there are any problematic individual tags remaining, we can file a new bug.
Comment 22•4 months ago
|
||
Comment 23•4 months ago
|
||
bugherder |