Closed Bug 94796 Opened 23 years ago Closed 23 years ago

code cleanup in nsURLHelper.cpp

Categories

(Core :: Networking, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: andreas.otte, Assigned: andreas.otte)

References

Details

Attachments

(4 files)

After landing the urlparsing branch there is some duplicate code in nsURLHelper.cpp. The Escape/Unescape stuff is copied in nsEscape.cpp which is part of xpcom. The code in nsURLHelper.h/cpp can be removed. Also it is no longer necessary to provide an IOservice to allow code outside of necko to use escaping/unescaping. It can now be directly called from everywhere.
Some comments: The old code in nsURLEscape was able to append to a given string. nsStdEscape now truncates the given string, nsAppendURLEscapedString had to be adapted accordingly. Because of the removed ioService the following files had to be adapted to call nsStdEscape/Unescape directly: nsHttpChannel.cpp nsExternalHelperAppService.cpp nsHTMLUtils.cpp nsMsgFolder.cpp nsMsgCompose.cpp nsParseMailbox.cpp Surely there is a better way to get the string as an argument into nsStdEscape/nsStdUnescape.
Summary: code cleanup → code cleanup in nsURLHelper.cpp
Attached patch updated version of the cleanup (deleted) — Splinter Review
r/sr=me
Priority: -- → P3
Target Milestone: --- → mozilla0.9.5
Attached patch new diff to prevent bitrott (deleted) — Splinter Review
Attached patch another diff to prevent bitrot (deleted) — Splinter Review
Blocks: 97983
Status: NEW → ASSIGNED
Looks good - should save a number of getService() calls. Built and works on Mac. r=ccarlen
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: