зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1444541 - Don't stop recorder on pagehide during frameswap. r=smaug
MozReview-Commit-ID: AZec0yXM1FI --HG-- extra : rebase_source : d96845f7422f6e57943bf90b1ef0f29df3e08099
This commit is contained in:
Родитель
ff8d25311c
Коммит
1238d9515a
|
@ -30,6 +30,7 @@
|
|||
#include "nsCharSeparatedTokenizer.h"
|
||||
#include "nsContentTypeParser.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDocShell.h"
|
||||
#include "nsError.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPermissionManager.h"
|
||||
|
@ -1699,9 +1700,20 @@ MediaRecorder::NotifyOwnerDocumentActivityChanged()
|
|||
nsIDocument* doc = window->GetExtantDoc();
|
||||
NS_ENSURE_TRUE_VOID(doc);
|
||||
|
||||
LOG(LogLevel::Debug, ("MediaRecorder %p document IsActive %d isVisible %d\n",
|
||||
this, doc->IsActive(), doc->IsVisible()));
|
||||
if (!doc->IsActive() || !doc->IsVisible()) {
|
||||
bool inFrameSwap = false;
|
||||
if (nsDocShell* docShell = static_cast<nsDocShell*>(doc->GetDocShell())) {
|
||||
inFrameSwap = docShell->InFrameSwap();
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("MediaRecorder %p NotifyOwnerDocumentActivityChanged "
|
||||
"IsActive=%d, "
|
||||
"IsVisible=%d, "
|
||||
"InFrameSwap=%d",
|
||||
this,
|
||||
doc->IsActive(),
|
||||
doc->IsVisible(),
|
||||
inFrameSwap));
|
||||
if (!doc->IsActive() || !(inFrameSwap || doc->IsVisible())) {
|
||||
// Stop the session.
|
||||
ErrorResult result;
|
||||
Stop(result);
|
||||
|
|
|
@ -312,6 +312,7 @@ EXTRA_JS_MODULES.media += [
|
|||
|
||||
LOCAL_INCLUDES += [
|
||||
'/caps',
|
||||
'/docshell/base',
|
||||
'/dom/base',
|
||||
'/layout/generic',
|
||||
'/layout/xul',
|
||||
|
|
Загрузка…
Ссылка в новой задаче