Closed Bug 151920 Opened 23 years ago Closed 23 years ago

nsPluginHostImpl::AddInstanceToActiveList does not return failure if 'new nsActivePlugin' failed

Categories

(Core Graveyard :: Plug-ins, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: peterlubczynski-bugs, Assigned: serhunt)

Details

(Whiteboard: [PL2:NA])

Attachments

(1 file)

From bug 140931: ------- Additional Comment #45 From Patrick C. Beard 2002-06-13 16:37 ------- (From update of attachment 86297 [details] [diff] [review]) nsPluginHostImpl::AddInstanceToActiveList() should return an nsresult code. ...the caller of this has no way of knowing memory allocation may have failed.
pushing to future for now
Priority: -- → P3
Target Milestone: --- → Future
Severity: minor → normal
Whiteboard: [PL2:NA]
Target Milestone: Future → mozilla1.0.2
Target Milestone: mozilla1.0.2 → mozilla1.2alpha
Taking. Let's get rid of easy-to-fix-but-annoying-to-have bugs.
Assignee: peterl → av
Attached patch patch v.1Splinter Review
Peter, I also put back a flag saying that the instance is a default plugin in |nsPluginHostImpl::SetUpDefaultPluginInstance|. I think it was cut-and-paste type of mistake when you checked in a fix for bug 140931, here: - AddInstanceToActiveList(plugin, instance, aURL, PR_TRUE); + AddInstanceToActiveList(plugin, instance, aURL, PR_FALSE, pIpeer); If this has been done on purpose please speak up and I'll correct for it.
Whiteboard: [PL2:NA] → [PL2:NA][review needed]
Comment on attachment 94410 [details] [diff] [review] patch v.1 r=serge
Attachment #94410 - Flags: review+
Status: NEW → ASSIGNED
Whiteboard: [PL2:NA][review needed] → [PL2:NA][superreview needed]
Comment on attachment 94410 [details] [diff] [review] patch v.1 >Index: nsPluginHostImpl.cpp > (void)aURL->GetSpec(url); just a side question: do you care if this result is non-ASCII? if you expect ASCII, then you should call GetAsciiSpec instead. what does this object expect? > nsActivePlugin * plugin = new nsActivePlugin(pluginTag, aInstance, url.get(), aDefaultPlugin, peer); >+ if (NS_FAILED(result)) >+ return result; > > return NS_OK; > } how about "return result" instead of these 3 lines of code?
Darin: no, we don't care about url spec being non-ASCII. We will likely rewrite this code soon anyway to use nsIURI. As to |return result| -- I also noticed this leftover after I posted the patch, I will change it before I check in.
Comment on attachment 94410 [details] [diff] [review] patch v.1 sr=darin
Attachment #94410 - Flags: superreview+
Whiteboard: [PL2:NA][superreview needed] → [PL2:NA][ready to check in]
In the trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [PL2:NA][ready to check in] → [PL2:NA]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: