Mozilla Home
Privacy
Cookies
Legal
Bugzilla
Browse
Advanced Search
New Bug
Reports
Documentation
Log In
Log In with GitHub
or
Remember me
Browse
Advanced Search
New Bug
Reports
Documentation
Attachment 829927 Details for
Bug 757726
[patch]
part-5-add-mEnsuredPlugins-flag.patch
WIP_757726-part-5-add-mEnsuredPlugins-flag.patch (text/plain), 1.84 KB, created by
Chris Peterson [:cpeterson]
(
hide
)
Description:
part-5-add-mEnsuredPlugins-flag.patch
Filename:
MIME Type:
Creator:
Chris Peterson [:cpeterson]
Size:
1.84 KB
patch
obsolete
># HG changeset patch ># Parent 16949049f03d35250fc483dc4404e38482e8a780 ># User Chris Peterson <cpeterson@mozilla.com> ># Date 1384117286 28800 > >Bug 757726 - Part 5: Add mEnsuredPlugins flag for case when no plugins are installed. r? > >diff --git a/dom/base/nsPluginArray.cpp b/dom/base/nsPluginArray.cpp >--- a/dom/base/nsPluginArray.cpp >+++ b/dom/base/nsPluginArray.cpp >@@ -18,16 +18,17 @@ > #include "mozilla/Services.h" > #include "nsIInterfaceRequestorUtils.h" > > using namespace mozilla; > using namespace mozilla::dom; > > nsPluginArray::nsPluginArray(nsPIDOMWindow* aWindow) > : mWindow(aWindow) >+ , mEnsuredPlugins(false) > { > SetIsDOMBinding(); > } > > void > nsPluginArray::Init() > { > nsCOMPtr<nsIObserverService> obsService = >@@ -240,20 +241,21 @@ nsPluginArray::AllowPlugins() const > nsCOMPtr<nsIDocShell> docShell = do_GetInterface(mWindow); > > return docShell && docShell->PluginsAllowedInCurrentDoc(); > } > > void > nsPluginArray::EnsurePlugins() > { >- if (!mPlugins.IsEmpty()) { >+ if (mEnsuredPlugins) { > // We already have an array of plugin elements. > return; > } >+ mEnsuredPlugins = true; > > nsRefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst(); > if (!pluginHost) { > // We have no plugin host. > return; > } > > nsTArray<nsRefPtr<nsPluginTag> > pluginTags; >diff --git a/dom/base/nsPluginArray.h b/dom/base/nsPluginArray.h >--- a/dom/base/nsPluginArray.h >+++ b/dom/base/nsPluginArray.h >@@ -55,16 +55,17 @@ public: > uint32_t Length(); > void GetSupportedNames(nsTArray< nsString >& aRetval); > > private: > bool AllowPlugins() const; > void EnsurePlugins(); > > nsCOMPtr<nsPIDOMWindow> mWindow; >+ bool mEnsuredPlugins; > nsTArray<nsRefPtr<nsPluginElement> > mPlugins; > }; > > class nsPluginElement MOZ_FINAL : public nsISupports, > public nsWrapperCache > { > public: > NS_DECL_CYCLE_COLLECTING_ISUPPORTS
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
|
Review
Attachments on
bug 757726
:
664380
|
674153
|
693268
|
693273
|
693793
|
820124
|
820126
|
820127
|
820130
|
820132
|
820133
|
825121
|
825122
|
825124
|
829927
|
829988
|
829992
|
831356
|
8421211