Closed
Bug 225952
Opened 21 years ago
Closed 20 years ago
*getter_Copies abuse
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: neil, Assigned: neil)
References
()
Details
Attachments
(2 files, 5 obsolete files)
1.15 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
3.34 KB,
patch
|
bryner
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
Two files abuse getter_Copies by assigning into *getter_Copies. At the very least they should be using Adopt, but the actual uses need rewriting anyway.
Comment 1•21 years ago
|
||
when touching objectframe, you could also change this: 978 nsObjectFrame::MakeAbsoluteURL(nsIURI* *aFullURI, 979 nsString aSrc, to use const nsAString& instead of nsString
Assignee | ||
Comment 2•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #135709 -
Flags: superreview?(jst)
Attachment #135709 -
Flags: review?(bz-vacation)
Assignee | ||
Comment 3•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #135710 -
Flags: superreview?(jst)
Attachment #135710 -
Flags: review?(blizzard)
Comment 4•21 years ago
|
||
Comment on attachment 135710 [details] [diff] [review] Fix gtkmozembed2.cpp >- if (embedPrivate->mURI.Length()) { >- *getter_Copies(embedString) = NEW_TOOLKIT_STRING(embedPrivate->mURI); >- retval = strdup(embedString); >- } >+ if (!embedPrivate->mURI.IsEmpty()) >+ retval = NEW_TOOLKIT_STRING(embedPrivate->mURI); unfortunately this mismatches the allocators... NEW_TOOLKIT_STRING is defined as either ToNewUTF8String or ToNewCString (see lxr). while i had a hard time finding callers in the tree of any of the functions you're changing, it does seem that they want to free the string using g_free. which means you must allocate it using g_strdup. so, i would recommend doing something like this... #define NEW_TOOLKIT_STRING(x) g_strdup(NS_ConvertUTF16toUTF8(x).get()) and accordingly for the ASCII variant. not pretty, but it's correct. :/
Attachment #135710 -
Flags: superreview?(jst)
Attachment #135710 -
Flags: review?(blizzard)
Attachment #135710 -
Flags: review-
Assignee | ||
Comment 5•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #135709 -
Attachment is obsolete: true
Assignee | ||
Comment 6•21 years ago
|
||
Assignee | ||
Comment 7•21 years ago
|
||
Attachment #135710 -
Attachment is obsolete: true
Attachment #135716 -
Attachment is obsolete: true
Comment 8•21 years ago
|
||
Comment on attachment 135714 [details] [diff] [review] Better fix for nsObjectFrame.cpp r+sr=bzbarsky.
Attachment #135714 -
Flags: superreview+
Attachment #135714 -
Flags: review+
Updated•21 years ago
|
Attachment #135709 -
Flags: superreview?(jst)
Attachment #135709 -
Flags: review?(bz-vacation)
Assignee | ||
Updated•21 years ago
|
Attachment #135717 -
Flags: superreview?(jst)
Attachment #135717 -
Flags: review?(blizzard)
Comment 9•21 years ago
|
||
Comment on attachment 135717 [details] [diff] [review] Real better fix for gtkmozembed2.cpp sr=jst
Attachment #135717 -
Flags: superreview?(jst) → superreview+
Comment 10•21 years ago
|
||
Comment on attachment 135717 [details] [diff] [review] Real better fix for gtkmozembed2.cpp This changes the allocator used for the return values for those functions. Please use strdup, if anything.
Attachment #135717 -
Flags: review?(blizzard) → review-
Assignee | ||
Comment 11•21 years ago
|
||
Attachment #135717 -
Attachment is obsolete: true
Assignee | ||
Comment 12•21 years ago
|
||
Comment on attachment 136723 [details] [diff] [review] Updated for review comment Assuming jst's sr still applies, re-requesting review.
Attachment #136723 -
Flags: superreview+
Attachment #136723 -
Flags: review?(blizzard)
Comment 13•20 years ago
|
||
The changes in gtkmozembed2 collides with 205425 (it ports gtkmozembed to use nsEmbedString). I can deal it with it but if we can get a review of that patch soon maybe it's worth to avoid the conflict.
Assignee | ||
Comment 14•20 years ago
|
||
Transferring jst's sr.
Assignee: string → neil.parkwaycc.co.uk
Attachment #136723 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #171942 -
Flags: superreview+
Attachment #171942 -
Flags: review?(bryner)
Updated•20 years ago
|
Attachment #171942 -
Flags: review?(bryner) → review+
Assignee | ||
Comment 15•20 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Attachment #136723 -
Flags: review?(blizzard)
Updated•3 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•