Closed Bug 166593 Opened 23 years ago Closed 23 years ago

Chatzilla IRC: impl of NewURI is broken, returns NS_OK and nsnull URI

Categories

(Other Applications Graveyard :: ChatZilla, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adamlock, Assigned: rginda)

References

()

Details

The Mozilla default homepage contains an anchor to "irc://irc.mozilla.org/#mozillazine". If you try to do a save as complete on this page, Mozilla crashes. The reason is because nsWebBrowserPersist.cpp goes through all anchors, attempting to fix them up relative to the base document. In this instance involves a call like this: rv = NS_NewURI(getter_AddRefs(newURI), "irc://irc.mozilla.org/#mozillazine", "http://www.mozilla.org/start/"); The persist object uses the rv to determine success or failure. The call appears to succeed but newURI is nsnull. The actuall code is here: http://lxr.mozilla.org/seamonkey/source/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp#2926 The reason is that IRC protocol handler (in chatzilla-service.js) is returning null in IRCProtocolHandler.prototype.newURI. It should probably return the original URI if base URIs are not relevant, or at least throw an error. I'm going to add a check to the persist code as part of bug 166269 to test that the uri is non-nsnull, but this may be a potential crasher in other places where irc: links might be processed.
We didn't used to get base URIs passed to that method. I'm not sure why. Suddenly (on 8/28) we started getting them. This caused bug 165901, as well as this one. I checked in a fix yesterday to just ignore the base URI if we get one.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.