ScriptLoader::OnStreamComplete never returns a failure
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: mayhemer, Assigned: mayhemer)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Please see this searchfox. The only caller to ScriptLoader::OnStreamComplete
is ScriptLoadHandler::OnStreamComplete which in case of a failure should clear the cache and propagate the error to its caller.
But apparently ScriptLoader::OnStreamComplete can never return a failure.
This (with patch for bug 1618292 applied) leads to sending load
event notification to a <link preload> tag regardless it's expected to get error
notification when the resource doesn't exist on the server (we get 404).
Baku, you've been involved in this code in the past. Should ScriptLoader::OnStreamComplete return rv
instead?
Comment 1•5 years ago
|
||
Baku, you've been involved in this code in the past. Should ScriptLoader::OnStreamComplete return
rv
instead?
Yes, it seems totally safe to expose rv
. And we already check the return value here:
https://searchfox.org/mozilla-central/rev/4ccefc3181f9d237ef4ca8bd17b4e7c101ddf7b5/dom/script/ScriptLoadHandler.cpp#405
![]() |
Assignee | |
Updated•5 years ago
|
![]() |
Assignee | |
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Description
•