Closed
Bug 68934
Opened 25 years ago
Closed 25 years ago
nsWebBrowser::SetProperty() problem
Categories
(Core Graveyard :: Embedding: APIs, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: kjrfun, Assigned: adamlock)
Details
(Keywords: embed)
Attachments
(1 file)
|
850 bytes,
patch
|
Details | Diff | Splinter Review |
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...
Fix is checked in
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 4•25 years ago
|
||
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein
Comment 5•25 years ago
|
||
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
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•