Closed Bug 198995 Opened 22 years ago Closed 22 years ago

nsScriptLoader::OnStreamComplete reports an erroneous assertion

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbradley, Unassigned)

References

Details

Attachments

(1 file)

When a channel provides a charset (http://lxr.mozilla.org/seamonkey/source/content/base/src/nsScriptLoader.cpp#770), and GetPreferred doesn't return one and returns an error (http://lxr.mozilla.org/seamonkey/source/content/base/src/nsScriptLoader.cpp#777), the assertion is fired. I don't think this should happen, but the paths of this function are rather complex. I'm using a trunk build on WinXP from 3/23
This problem might be that the code at line 773 is using characterSet instead of a temporary like the code at 789 is doing
Attached patch A possible fixSplinter Review
I'm not sure this is the right thing, but it mimics the code below and clears up the assertion problem
David, could you provide a link to a page that shows this problem? I'd like to step through this code in such a case to make sure we get this right.
Blocks: 190852
Attachment #118319 - Flags: superreview?(peterv)
Attachment #118319 - Flags: review?(jst)
Comment on attachment 118319 [details] [diff] [review] A possible fix r=jst
Attachment #118319 - Flags: review?(jst) → review+
Attachment #118319 - Flags: superreview?(peterv) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: