зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1525720, part 4 - Assert in DrawSnapshot if not the chrome process. r=mattwoodrow
This API is only intended to be used in the chrome process and this commit makes this explicit to simplify a later refactoring. Differential Revision: https://phabricator.services.mozilla.com/D31434 --HG-- extra : source : b255e0a84e12657a62a2cdfd4a4c2ebb893b2a0d
This commit is contained in:
Родитель
936683ad1d
Коммит
61dbcdeb2a
|
@ -3235,6 +3235,12 @@ void nsFrameLoader::Print(uint64_t aOuterWindowID,
|
|||
already_AddRefed<mozilla::dom::Promise> nsFrameLoader::DrawSnapshot(
|
||||
double aX, double aY, double aW, double aH, double aScale,
|
||||
const nsAString& aBackgroundColor, mozilla::ErrorResult& aRv) {
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
if (!XRE_IsParentProcess()) {
|
||||
aRv = NS_ERROR_FAILURE;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<nsIGlobalObject> global = GetOwnerContent()->GetOwnerGlobal();
|
||||
RefPtr<Promise> promise = Promise::Create(global, aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче