зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1286341 - Initialize sBrandName before layout startup when initializing the cubeb. r=jesup
We call `cubeb_init` quite early these days because the sandbox is enabled a short time after, so we'd call GetCubebContext before InitBrandName, thus showing the warning. MozReview-Commit-ID: 4gmN8GKq4qd --HG-- extra : rebase_source : 0028f51daf166792f05ab1aad26a807540d18fe8
This commit is contained in:
Родитель
a02e63bc63
Коммит
e556746dbc
|
@ -167,7 +167,12 @@ cubeb* GetCubebContextUnlocked()
|
||||||
return sCubebContext;
|
return sCubebContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_WARN_IF_FALSE(sBrandName, "Could not get brandName?");
|
if (!sBrandName && NS_IsMainThread()) {
|
||||||
|
InitBrandName();
|
||||||
|
} else {
|
||||||
|
NS_WARN_IF_FALSE(sBrandName,
|
||||||
|
"Did not initialize sbrandName, and not on the main thread?");
|
||||||
|
}
|
||||||
|
|
||||||
DebugOnly<int> rv = cubeb_init(&sCubebContext, sBrandName);
|
DebugOnly<int> rv = cubeb_init(&sCubebContext, sBrandName);
|
||||||
NS_WARN_IF_FALSE(rv == CUBEB_OK, "Could not get a cubeb context.");
|
NS_WARN_IF_FALSE(rv == CUBEB_OK, "Could not get a cubeb context.");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче