Closed
Bug 58363
Opened 24 years ago
Closed 23 years ago
wrong TimeBombURL returned in nsBrowserContentHandler::GetDefaultArgs(...)
Categories
(SeaMonkey :: UI Design, defect, P3)
SeaMonkey
UI Design
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jag+mozbugs, Assigned: jag+mozilla)
References
()
Details
Attachments
(1 file)
661 bytes,
patch
|
Details | Diff | Splinter Review |
2403 if ( expired ) 2404 { 2405 char* urlString; 2406 rv = timeBomb->GetTimebombURL(&urlString); 2407 if ( NS_FAILED(rv) ) return rv; 2408 2409 *aDefaultArgs = nsXPIDLString::Copy(url); 2410 nsMemory::Free(urlString); 2411 return rv; 2412 } The urlString is never used. Tracing this code's history explains why. It used to be something like: nsString url(urlString); *aDefaultArgs = url.ToNewUnicode(); This was simplified to *aDefaultArgs = NS_ConvertASCIItoUCS2(url).ToNewUnicode(); Note the bogus |url| instead of |urlString|. This always gets us an empty string instead of the TimeBombURL. This change to the code was probably made because there already was a |url| (compiler warnings), and the compile didn't fail because |url| already existed. Because the other |url| is |nsXPIDLCString url;|, it was changed to use nsXPIDLString::Copy(...). Suggested fix: - *aDefaultArgs = nsXPIDLString::Copy(url); + *aDefaultArgs = NS_ConvertASCIItoUCS2(urlString).ToNewUnicode(); I'll attach a patch.
Reporter | ||
Comment 1•24 years ago
|
||
Adding keywords, changing summary slightly.
Reporter | ||
Comment 2•24 years ago
|
||
Comment 4•23 years ago
|
||
resolving as fixed per jag
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 5•23 years ago
|
||
rubberstamp vrfy (unless you have a testcase for me to check :).
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•