Closed
Bug 16763
Opened 26 years ago
Closed 17 years ago
CreateInstance implementation does not check for aggregation
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
INCOMPLETE
Future
People
(Reporter: hjtoi-bugzilla, Unassigned)
Details
Attachments
(1 file)
|
10.45 KB,
text/html
|
Details |
Many implementations of CreateInstance do not check the value of the [in]
parameter (typically 'aOuter') that tells if aggregation is to be used. Most
implementations are not aggregations so they should check it and report
NS_ERROR_NO_AGGREGATION if appropriate.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M16
Comment 1•26 years ago
|
||
Yeah I have seen some of this too.
| Reporter | ||
Comment 2•26 years ago
|
||
I must be really bored... I decided to flex my Perl muscle(s?) a bit to find
where this bug occurs. But not so bored that I would have made the script
perfect. I guess jst & julle @citec.fi are as bored as I am and we spent a
considerable amount of time figuring out how to run this script, heh.
Finally when all else was set and I started it on NT with the bash shell it went
fine for some time and then got access violation. So I asked jst to run the same
thing on Linux so eventually we got some output ;)
Anyway, the script is below and I will attach the script output.
--ht.pl--
#!perl
#
# Utitility to find CreateInstance implementations that do not
# return NS_ERROR_NO_AGGREGATION. See Bugzilla bug #16763.
#
# Invocation (from MOZ_TOP directory) (bash):
# for i in `find . -name '*.h' -or -name '*.cpp'`; do ht.pl $i; done
#
$file = $ARGV[0];
$in = 0;
$line = 0;
$brace = 0;
$in_method = 0;
$create_line = "";
# If true, output is in HTML (need html, head, body tags)
$html = 1;
# LXR base
$lxr = "http://lxr.mozilla.org/seamonkey/source/";
if ($html) {
print "<ul>\n";
}
while (<>) {
$line++;
if (/Factory::CreateInstance/) {
if ($html) {
$create_line = "<li><a href=\"$lxr$file#$line\">$file:$line:</a> $_</li>";
} else {
$create_line = "$file:$line: $_";
}
$in = 1;
}
if ($in) {
if (/\{/) {
if ($brace++ == 0) {
$in_method = 1;
}
}
if (/\}/) {
$brace--;
}
if ($brace < 0) {
if ($html) {
print "</ul><p><b>Misplaced braces?</b></p>\n";
} else {
print "Misplaced braces?\n";
}
exit;
}
if ($in_method and $brace == 0) {
$in = 0;
$in_method = 0;
print "$create_line";
}
if ($in_method and /NS_ERROR_NO_AGGREGATION/) {
$brace = 0;
$in = 0;
$in_method = 0;
}
}
}
if ($html) {
print "</ul>\n";
}
| Reporter | ||
Comment 3•26 years ago
|
||
Updated•26 years ago
|
Assignee: dp → scc
Status: ASSIGNED → NEW
Updated•26 years ago
|
Status: NEW → ASSIGNED
Comment 4•26 years ago
|
||
Note: this is another good thing to check for with the [XP]COM lint script.
Updated•26 years ago
|
Target Milestone: M16 → M20
Comment 5•26 years ago
|
||
mass re-assigning to my new bugzilla account
Assignee: scc → scc
Status: ASSIGNED → NEW
Updated•26 years ago
|
Status: NEW → ASSIGNED
Comment 6•25 years ago
|
||
dp is no longer @netscape.com. changing qa contact to default for this product
QA Contact: dp → kandrot
Comment 7•23 years ago
|
||
re-assigning to XPCOM owner
Assignee: scc → dougt
Status: ASSIGNED → NEW
QA Contact: kandrot → scc
Updated•23 years ago
|
Target Milestone: --- → Future
Updated•20 years ago
|
Assignee: dougt → nobody
QA Contact: scc → xpcom
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•