Open Bug 620950 Opened 14 years ago Updated 2 years ago

nsImageMap::AddArea could set area to 0 in default NS_NOTREACHED case

Categories

(Core :: Layout: Images, Video, and HTML Frames, enhancement)

enhancement

Tracking

()

People

(Reporter: timeless, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Attachments

(1 file)

833 nsImageMap::AddArea(nsIContent* aArea)
834 {
842   Area* area;
843   switch (aArea->FindAttrValueIn(kNameSpaceID_None, nsGkAtoms::shape,
844                                  strings, eIgnoreCase)) {
862   default:
863     NS_NOTREACHED("FindAttrValueIn returned an unexpected value.");
864     break;
865   }
866   if (!area)
867     return NS_ERROR_OUT_OF_MEMORY;
868 
869   //Add focus listener to track area focus changes
870   aArea->AddEventListenerByIID(this, NS_GET_IID(nsIDOMFocusListener));
881   area->ParseCoords(coords);
882   mAreas.AppendElement(area);
Attached patch proposalSplinter Review
NS_NOTREACHED doesn't do anything in opt builds. the other approach would be NS_RUNTIMEABORT, I don't have an opinion.
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #499382 - Flags: review?(jst)
Comment on attachment 499382 [details] [diff] [review]
proposal

Clearing out old reviews. If this is still relevant, please re-request review for this patch.
Attachment #499382 - Flags: review?(jst)
Product: Core → Core Graveyard
Product: Core Graveyard → Core

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: timeless → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: