mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1043025 - Null-check when getting the parent object of an AudioContext because we might not have a window all all time during shutdown. r=roc
This commit is contained in:
parent
a838adcacf
commit
905bdcf2e5
@ -73,12 +73,15 @@ void
|
||||
MediaStreamAudioSourceNode::PrincipalChanged(DOMMediaStream* ms)
|
||||
{
|
||||
bool subsumes = false;
|
||||
nsIDocument* doc = Context()->GetParentObject()->GetExtantDoc();
|
||||
if (doc) {
|
||||
nsIPrincipal* docPrincipal = doc->NodePrincipal();
|
||||
nsIPrincipal* streamPrincipal = mInputStream->GetPrincipal();
|
||||
if (NS_FAILED(docPrincipal->Subsumes(streamPrincipal, &subsumes))) {
|
||||
subsumes = false;
|
||||
nsPIDOMWindow* parent = Context()->GetParentObject();
|
||||
if (parent) {
|
||||
nsIDocument* doc = parent->GetExtantDoc();
|
||||
if (doc) {
|
||||
nsIPrincipal* docPrincipal = doc->NodePrincipal();
|
||||
nsIPrincipal* streamPrincipal = mInputStream->GetPrincipal();
|
||||
if (NS_FAILED(docPrincipal->Subsumes(streamPrincipal, &subsumes))) {
|
||||
subsumes = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
auto stream = static_cast<AudioNodeExternalInputStream*>(mStream.get());
|
||||
|
@ -50,4 +50,6 @@ class DebianBootstrapper(BaseBootstrapper):
|
||||
self.apt_install(*self.packages)
|
||||
|
||||
def _update_package_manager(self):
|
||||
self.run_as_root(['apt-get', 'update'])
|
||||
#self.run_as_root(['apt-get', 'update'])
|
||||
print 'lala'
|
||||
|
||||
|
@ -23,7 +23,7 @@ class UbuntuBootstrapper(DebianBootstrapper):
|
||||
# Ubuntu releases up through at least 13.04 don't ship a modern
|
||||
# Mercurial. So we hook up a PPA that provides one.
|
||||
self._add_ppa('mercurial-ppa/releases')
|
||||
self._update_package_manager()
|
||||
# self._update_package_manager()
|
||||
self.apt_install('mercurial')
|
||||
|
||||
def _add_ppa(self, ppa):
|
||||
|
Loading…
Reference in New Issue
Block a user