Closed
Bug 239402
Opened 20 years ago
Closed 11 years ago
user_pref("plugin.dont_try_safe_calls", true); is ignored
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: timeless, Assigned: timeless)
References
Details
Attachments
(1 file)
2.33 KB,
patch
|
Details | Diff | Splinter Review |
the "fix" for bug 166815 didn't actually _fix_ the problem...
Attachment #145308 -
Flags: review?(caillon)
Comment 2•20 years ago
|
||
Comment on attachment 145308 [details] [diff] [review] try to observe pref changes >+ nsCOMPtr<nsIPrefBranchInternal> pbi(do_QueryInterface(mPrefService)); >+ pbi->AddObserver("plugin", this, PR_FALSE); Make sure QI succeeds. > } > > nsCOMPtr<nsIObserverService> obsService = do_GetService("@mozilla.org/observer-service;1"); >@@ -6089,7 +6092,7 @@ > //////////////////////////////////////////////////////////////////////// > NS_IMETHODIMP nsPluginHostImpl::Observe(nsISupports *aSubject, > const char *aTopic, >- const PRUnichar *someData) >+ const PRUnichar *aSomeData) Since you're changing this, please change it to match the usual name of |aData|. > { > #ifdef NS_DEBUG > printf("nsPluginHostImpl::Observe \"%s\"\n", aTopic ? aTopic : ""); >@@ -6100,6 +6103,18 @@ > } else if (!nsCRT::strcmp(NS_XPCOM_SHUTDOWN_OBSERVER_ID, aTopic)) Care to fix this to use ::strcmp instead of the nsCRT version? > { > UnloadUnusedLibraries(); >+ if (mPrefService) { >+ nsCOMPtr<nsIPrefBranchInternal> pbi(do_QueryInterface(mPrefService)); >+ pbi->RemoveObserver("plugin", this); Again check the QI result. >+ } >+ } else if (!strcmp("nsPref:changed", aTopic)) { NS_PREFBRANCH_PREFCHANGED_TOPIC_ID >+ nsDependentString someData(aSomeData); >+ if (someData.Equals(NS_LITERAL_STRING("plugin.dont_try_safe_calls"))) >+ mPrefService->GetBoolPref("plugin.dont_try_safe_calls", &gSkipPluginSafeCalls); >+ else if (someData.Equals(NS_LITERAL_STRING("plugin.override_internal_types"))) >+ mPrefService->GetBoolPref("plugin.override_internal_types", &mOverrideInternalTypes); >+ else if (someData.Equals(NS_LITERAL_STRING("plugin.allow_alien_star_handler"))) >+ mPrefService->GetBoolPref("plugin.allow_alien_star_handler", &mAllowAlienStarHandler); > } > return NS_OK; > } Shouldn't you also change FindPlugins() to not check the pref value all the time its called, and move the initialization somewhere else? But maybe not. I'm not familiar with the plugin architechture...
Attachment #145308 -
Flags: review?(caillon)
Comment 3•20 years ago
|
||
what if those prefs are not set?
Updated•15 years ago
|
QA Contact: plugins
Comment 4•11 years ago
|
||
This got pref removed with bug 839731
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•