Closed Bug 68934 Opened 25 years ago Closed 25 years ago

nsWebBrowser::SetProperty() problem

Categories

(Core Graveyard :: Embedding: APIs, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kjrfun, Assigned: adamlock)

Details

(Keywords: embed)

Attachments

(1 file)

Take a look at this method: NS_IMETHODIMP nsWebBrowser::SetProperty(PRUint32 aId, PRUint32 aValue) { switch (aId) { case nsIWebBrowserSetup::SETUP_ALLOW_PLUGINS: { NS_ENSURE_STATE(mDocShell); NS_ENSURE_TRUE((aValue == PR_TRUE || aValue == PR_FALSE), NS_ERROR_INVALID_ARG); mDocShell->SetAllowPlugins(aValue); } default: return NS_ERROR_INVALID_ARG; } return NS_OK; } Notice anything missing? How about a break statement at the end of case nsIWebBrowserSetup::SETUP_ALLOW_PLUGINS. Without it, result code is always NS_ERROR_INVALID_ARG. (caught it with NS_ASSERTION)
Thanks for point it out. Marking the bug as NEW. I did fix this a while back in my local tree just before my harddrive corrupted...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: embed
Fix is checked in
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein
yep. break statement is now in there. switch (aId) 606 { 607 case nsIWebBrowserSetup::SETUP_ALLOW_PLUGINS: 608 { 609 NS_ENSURE_STATE(mDocShell); 610 NS_ENSURE_TRUE((aValue == PR_TRUE || aValue == PR_FALSE), NS_ERROR_INVALID_ARG); 611 mDocShell->SetAllowPlugins(aValue); 612 } 613 break;
Status: RESOLVED → VERIFIED
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: