mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
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:
parent
a02e63bc63
commit
e556746dbc
@ -167,7 +167,12 @@ cubeb* GetCubebContextUnlocked()
|
||||
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);
|
||||
NS_WARN_IF_FALSE(rv == CUBEB_OK, "Could not get a cubeb context.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user