Closed Bug 274958 Opened 20 years ago Closed 16 years ago

don't return NS_ERROR_FAILURE when INITIAL-IZATION fails

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: timeless, Assigned: bastiaan)

References

()

Details

(Whiteboard: [good first bug])

Attachments

(1 file, 3 obsolete files)

the proper thing to do is change from NS_GENERIC_FACTORY_CONSTRUCTOR to 
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT
Whiteboard: [good first bug]
Attached patch fix (obsolete) — Splinter Review
as described in comment #0.
Assignee: prabhat.hegde → b.jacques
Status: NEW → ASSIGNED
Attachment #189294 - Flags: review?(smontagu)
Keywords: helpwanted
Attachment #189294 - Flags: review?(smontagu)
Attached patch better fix (obsolete) — Splinter Review
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT needs a second argument..
Attachment #189294 - Attachment is obsolete: true
Attachment #189295 - Flags: review?(smontagu)
Comment on attachment 189295 [details] [diff] [review]
better fix

   mCtlObj = do_CreateInstance(kLECID, &rv);
-  if (NS_FAILED(rv)) {
+  NS_ENSURE_TRUE(rv, rv);

erm, this will return basically always... and it will show a warning in the
common case that rv is NS_OK.

+  virtual nsresult Init();

why virtual?
Attached patch even better fix (obsolete) — Splinter Review
Thanks biesi!
Attachment #189295 - Attachment is obsolete: true
Attachment #189332 - Flags: review?(smontagu)
..this time.
Attachment #189332 - Attachment is obsolete: true
Attachment #189333 - Flags: review?(smontagu)
Attachment #189332 - Flags: review?(smontagu)
Attachment #189295 - Flags: review?(smontagu)
Attachment #189333 - Flags: review?(smontagu) → review?(jshin1987)
Attachment #189333 - Flags: review?(jshin1987) → review?(smontagu)
Simon, this patch has been waiting for review for a few years...
Comment on attachment 189333 [details] [diff] [review]
the right patch..

This is obsolete code AFAIK
Attachment #189333 - Flags: review?(smontagu)
Component: Layout: CTL → Layout: Text
QA Contact: arthit → layout.fonts-and-text
RESO/INVALID per c#7 (Bastiaan, thanks for your efforts anyway)
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: