Closed
Bug 109172
Opened 23 years ago
Closed 23 years ago
nsDependentString assertions using global history
Categories
(Core Graveyard :: History: Global, defect, P1)
Core Graveyard
History: Global
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.7
People
(Reporter: dbaron, Assigned: dbaron)
Details
Attachments
(2 files)
8.02 KB,
patch
|
jag+mozilla
:
review+
|
Details | Diff | Splinter Review |
2.78 KB,
patch
|
jag+mozilla
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
After the landing of bug 104651 there are a bunch of null-termination assertions about the dependent string usage when using the history window.
Assignee | ||
Comment 1•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.9.7
Comment 2•23 years ago
|
||
Comment on attachment 57125 [details] [diff] [review] patch r=jag
Attachment #57125 -
Flags: review+
Assignee | ||
Comment 3•23 years ago
|
||
Fix checked in 2001-11-10 17:27 PDT.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 4•23 years ago
|
||
yo.. you've broken the symmetry of tokenPair and made the "AgeInDays" comparison almost totally unreadable - can you make them both nsDependentSingleFragmentCSubstring please?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 5•23 years ago
|
||
+ const char* startPtr = (const char*)yarn.mYarn_Buf; + rv = gRDFService->GetResource( + nsCAutoString(Substring(startPtr, startPtr+yarn.mYarn_Fill)).get(), + getter_AddRefs(resource)); This is also totally unreadable. Can't we do something to declare the Substring further above the GetResource call? is the nsCAutoString still necessary, with Substring()
Assignee | ||
Comment 6•23 years ago
|
||
> yo.. you've broken the symmetry of tokenPair and made the "AgeInDays" comparison > almost totally unreadable - can you make them both > nsDependentSingleFragmentCSubstring please? Not easily, since nsASingleFragmentString doesn't have .get(), for good reason. I guess I could throw str.BeginReading(iter) all over the place, but I'd rather not. I had really wanted to avoid using our string classes at all here, since this code doesn't really get along with them. > This is also totally unreadable. Can't we do something to declare the > Substring further above the GetResource call? is the nsCAutoString still > necessary, with Substring() OK, I could split it out.
Assignee | ||
Comment 7•23 years ago
|
||
Assignee | ||
Comment 8•23 years ago
|
||
Oh, and that nsCAutoString is being used as PromiseFlatCString. It may well be faster until bug 109572 is fixed.
Comment 9•23 years ago
|
||
Comment on attachment 57403 [details] [diff] [review] additional patch r=jag
Attachment #57403 -
Flags: review+
Comment 10•23 years ago
|
||
Comment on attachment 57403 [details] [diff] [review] additional patch thanks.. makes that code much more readable. sr=alecf
Attachment #57403 -
Flags: superreview+
Comment 11•23 years ago
|
||
Now I'm just curious: + const nsASingleFragmentCString& tokenName = + Substring(token->tokenName, token->tokenName + token->tokenNameLength); How exactly does this work? It looks like a temporary is created by Substring() and a reference is stored by tokenName.. but doesn't the temporary go away almost immediately, leaving tokenName pointing to possibly-freed memory? Just curious how this string magic does its thing...
Comment 12•23 years ago
|
||
The reference keeps the object alive for the scope of the reference itself.
Assignee | ||
Comment 13•23 years ago
|
||
Checked in 2001-11-11 12:37 PDT.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 14•23 years ago
|
||
neat, learn something new every day. Thanks guys.
Comment 15•22 years ago
|
||
mass-verifying claudius' Fixed bugs which haven't changed since 2001.12.31. if you think this particular bug is not fixed, please make sure of the following before reopening: a. retest with a *recent* trunk build. b. query bugzilla to see if there's an existing, open bug (new, reopened, assigned) that covers your issue. c. if this does need to be reopened, make sure there are specific steps to reproduce (unless already provided and up-to-date). thanks! [set your search string in mail to "AmbassadorKoshNaranek" to filter out these messages.]
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•