Closed Bug 243429 Opened 22 years ago Closed 20 years ago

XPCOM_BREAK_ON_LOAD no longer works

Categories

(Core :: XPCOM, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

References

Details

(Keywords: fixed-aviary1.0, fixed1.7.5, regression)

Attachments

(4 files, 2 obsolete files)

After the string branch landing, XPCOM_BREAK_ON_LOAD no longer works due to a subtle behavior change in nsString::Find() when the starting index is < 0.
Attached patch patchSplinter Review
Restore the old behavior -- a starting index < 0 is treated as starting from the beginning of the string.
Attachment #148327 - Flags: superreview?(darin)
Attachment #148327 - Flags: review?(darin)
Comment on attachment 148327 [details] [diff] [review] patch thanks bryner!
Attachment #148327 - Flags: superreview?(darin)
Attachment #148327 - Flags: superreview+
Attachment #148327 - Flags: review?(darin)
Attachment #148327 - Flags: review+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 243095 has been marked as a duplicate of this bug. ***
Despite this fix, XPCOM_BREAK_ON_LOAD is still busted in RFind on MinGW.
Status: RESOLVED → REOPENED
OS: Linux → All
Resolution: FIXED → ---
Yep, busted on OpenVMS too (see my comment today in bug 240837).
My mistake. The fix does fix it. Its just that the fix isn't in 1.7. Sigh.....
dmose: what build were you referring to in comment #5? a 1.7 branch build / aviary 1.0 build? if so, can we close this as fixed again? colin is saying that this is only fixed on the trunk.
Darin: this happens on both the trunk and 1.7 branch for me.
Was this put in aviary? I think I'd like it in 1.7 also.
Status: REOPENED → RESOLVED
Closed: 22 years ago21 years ago
Resolution: --- → FIXED
Last I checked, this was still broken on MinGW, and Mike says he didn't check in any changes on the trunk.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch modernize modulename matching (obsolete) — Splinter Review
Does this (+ "suspend" for XPCOM_DEBUG_BREAK) work for you? I need these to have break-on-load work on Mac OS X (10.3.9).
> Created an attachment (id=207049) [edit] > modernize modulename matching NOTE: The old code attempted case-insensitive substring matching. This patch changes it to case-sensitive substring matching. Is that really desirable?
how about this one?
Attachment #207049 - Attachment is obsolete: true
The prev patch broke colon-separated multiple module names search. Curiously now I don't need XPCOM_DEBUG_BREAK again....
Attachment #207386 - Attachment is obsolete: true
Attachment #207411 - Flags: review?(bryner)
Comment on attachment 207411 [details] [diff] [review] recover multiple module names search Can you ask Darin instead?
Attachment #207411 - Flags: review?(bryner)
Attachment #207411 - Flags: review?(darin)
Comment on attachment 207411 [details] [diff] [review] recover multiple module names search >Index: nsNativeComponentLoader.cpp >- if (leafName.Find(token, PR_TRUE)) { >+ nsDependentCString tokCStr(token); >+ nsACString::const_iterator start, end; >+ leafName.BeginReading(start); >+ leafName.EndReading(end); >+ if (CaseInsensitiveFindInReadable(tokCStr, start, end)) { > NS_BREAK(); I think the old bug was that the return value of Find was not checked correctly. This should work too: if (leafName.Find(token, PR_TRUE) != kNotFound) { NS_BREAK(); } If that works, then I would use that instead as it is a lot less code.
I think this is a good chance to get rid of the obsolete api, but I don't mind if you prefer this one.
I think this is a good chance to get rid of the obsolete api, but I don't mind if you prefer this one.
Comment on attachment 208188 [details] [diff] [review] compare to kNotFound r+sr=darin I think there are parts of the "obsolete" string API such as Find and RFind that are in fact better than the functions in nsReadableUtils.h <-- many of those functions result in bloaty code IMO. We should fix the string API to provide things like Find and RFind in a non-obsolete way ;-)
Attachment #208188 - Flags: superreview+
Attachment #208188 - Flags: review+
darin, could you check this in? thanks.
Sorry, I meant to mark this fixed after I commited it a while back.
Status: REOPENED → RESOLVED
Closed: 21 years ago20 years ago
Resolution: --- → FIXED
Attachment #207411 - Flags: review?(darin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: