Bug 866108 - Part 2: Do not assume that we can always get a script global from the context's window; r=padenot

This commit is contained in:
Ehsan Akhgari 2013-04-27 18:44:13 -04:00
parent ab2d0bc310
commit 6d602f4c09

View File

@ -350,6 +350,9 @@ AudioContext::GetJSContext() const
nsCOMPtr<nsIScriptGlobalObject> scriptGlobal =
do_QueryInterface(GetParentObject());
if (!scriptGlobal) {
return nullptr;
}
nsIScriptContext* scriptContext = scriptGlobal->GetContext();
if (!scriptContext) {
return nullptr;