Bug 1352575 (part 5) - Remove PluginModuleParent::mIsStartingAsync. r=jimm.

This allows a bunch of other things to be removed too, including
PluginModuleParent::mSurrogateInstances,
PluginModuleChromeParent::sInstantiated, and NS_PLUGIN_INIT_PENDING.

The patch also removes the AsyncPluginInit crash annotation.
This commit is contained in:
Nicholas Nethercote
2017-04-18 16:56:43 +10:00
parent 8feeffcee0
commit e20e423748
10 changed files with 33 additions and 265 deletions

View File

@@ -99,8 +99,6 @@ public:
bool RemovePendingSurrogate(const RefPtr<PluginAsyncSurrogate>& aSurrogate);
/** @return the state of the pref that controls async plugin init */
bool IsStartingAsync() const { return mIsStartingAsync; }
/** @return whether this modules NP_Initialize has successfully completed
executing */
bool IsInitialized() const { return mNPInitialized; }
@@ -315,8 +313,6 @@ public:
virtual nsresult ContentsScaleFactorChanged(NPP instance, double aContentsScaleFactor) override;
#endif
void InitAsyncSurrogates();
layers::TextureClientRecycleAllocator* EnsureTextureAllocatorForDirectBitmap();
layers::TextureClientRecycleAllocator* EnsureTextureAllocatorForDXGISurface();
@@ -324,7 +320,6 @@ protected:
void NotifyFlashHang();
void NotifyPluginCrashed();
void OnInitFailure();
bool MaybeRunDeferredShutdown();
bool DoShutdown(NPError* error);
bool GetSetting(NPNVariable aVariable);
@@ -357,10 +352,8 @@ protected:
friend class mozilla::plugins::PluginAsyncSurrogate;
bool mIsStartingAsync;
bool mNPInitialized;
bool mIsNPShutdownPending;
nsTArray<RefPtr<PluginAsyncSurrogate>> mSurrogateInstances;
nsresult mAsyncNewRv;
uint32_t mRunID;
@@ -432,14 +425,6 @@ class PluginModuleChromeParent
static PluginLibrary* LoadModule(const char* aFilePath, uint32_t aPluginId,
nsPluginTag* aPluginTag);
/**
* The following two functions are called by SetupBridge to determine
* whether an existing plugin module was reused, or whether a new module
* was instantiated by the plugin host.
*/
static void ClearInstantiationFlag() { sInstantiated = false; }
static bool DidInstantiate() { return sInstantiated; }
virtual ~PluginModuleChromeParent();
/*
@@ -540,9 +525,6 @@ class PluginModuleChromeParent
virtual mozilla::ipc::IPCResult
RecvNP_InitializeResult(const NPError& aError) override;
void
SetContentParent(dom::ContentParent* aContentParent);
bool
SendAssociatePluginId();
@@ -704,7 +686,6 @@ private:
dom::ContentParent* mContentParent;
nsCOMPtr<nsIObserver> mPluginOfflineObserver;
bool mIsBlocklisted;
static bool sInstantiated;
#if defined(XP_WIN) && defined(MOZ_SANDBOX)
mozilla::SandboxPermissions mSandboxPermissions;
#endif