mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 05850dac2882 (bug 1143562) for B2G Emulator ICS M2 bustage CLOSED TREE
This commit is contained in:
parent
4d1f2f2f21
commit
66fbe4bd1b
@ -191,14 +191,12 @@ GeckoMediaPluginService::Init()
|
||||
prefs->AddObserver("media.gmp.plugin.crash", this, false);
|
||||
}
|
||||
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
// Directory service is main thread only, so cache the profile dir here
|
||||
// so that we can use it off main thread.
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
nsresult rv = NS_NewLocalFile(NS_LITERAL_STRING("/data/b2g/mozilla"), false, getter_AddRefs(mStorageBaseDir));
|
||||
#else
|
||||
// We only do this on non-B2G, as this fails in multi-process Gecko.
|
||||
// TODO: Make this work in multi-process Gecko.
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(mStorageBaseDir));
|
||||
#endif
|
||||
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
@ -212,6 +210,7 @@ GeckoMediaPluginService::Init()
|
||||
if (NS_WARN_IF(NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS)) {
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Kick off scanning for plugins
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
@ -954,10 +953,14 @@ GeckoMediaPluginService::ReAddOnGMPThread(nsRefPtr<GMPParent>& aOld)
|
||||
NS_IMETHODIMP
|
||||
GeckoMediaPluginService::GetStorageDir(nsIFile** aOutFile)
|
||||
{
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
if (NS_WARN_IF(!mStorageBaseDir)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return mStorageBaseDir->Clone(aOutFile);
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
static nsresult
|
||||
@ -1061,6 +1064,11 @@ GeckoMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
||||
NS_ConvertUTF16toUTF8(aTopLevelOrigin).get(),
|
||||
(aInPrivateBrowsing ? "PrivateBrowsing" : "NonPrivateBrowsing")));
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_WARNING("GeckoMediaPluginService::GetNodeId Not implemented on B2G");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
|
||||
if (aOrigin.EqualsLiteral("null") ||
|
||||
@ -1501,6 +1509,11 @@ GeckoMediaPluginService::ClearStorage()
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s", __CLASS__, __FUNCTION__));
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_WARNING("GeckoMediaPluginService::ClearStorage not implemented on B2G");
|
||||
return;
|
||||
#endif
|
||||
|
||||
// Kill plugins with valid nodeIDs.
|
||||
KillPlugins(mPlugins, mMutex, &IsNodeIdValid);
|
||||
|
||||
|
@ -139,7 +139,9 @@ private:
|
||||
|
||||
nsTArray<nsRefPtr<GMPParent>> mAsyncShutdownPlugins; // GMP Thread only.
|
||||
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
nsCOMPtr<nsIFile> mStorageBaseDir;
|
||||
#endif
|
||||
|
||||
// Hashes of (origin,topLevelOrigin) to the node id for
|
||||
// non-persistent sessions.
|
||||
|
Loading…
Reference in New Issue
Block a user