mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1488886 - AllocPAPZCTreeManager should gracefully fail if APZ is not enabled. r=botond
Depends on D164682 Differential Revision: https://phabricator.services.mozilla.com/D164683
This commit is contained in:
parent
b708eda376
commit
c18b24369d
@ -66,14 +66,5 @@ add_task(
|
||||
"closed",
|
||||
"Check that panel state is 'closed'"
|
||||
);
|
||||
|
||||
// Move the cursor to the center of the browser window where hopefully it
|
||||
// will cause less intermittent failures in the next tests than keeping it
|
||||
// in the toolbar area.
|
||||
EventUtils.synthesizeNativeMouseEvent({
|
||||
type: "mousemove",
|
||||
target: document.documentElement,
|
||||
atCenter: true,
|
||||
});
|
||||
}
|
||||
);
|
||||
|
@ -2778,6 +2778,11 @@ void BrowserChild::InitAPZState() {
|
||||
// multiple inheritance.
|
||||
PAPZCTreeManagerChild* baseProtocol =
|
||||
cbc->SendPAPZCTreeManagerConstructor(mLayersId);
|
||||
if (!baseProtocol) {
|
||||
MOZ_ASSERT(false,
|
||||
"Allocating a TreeManager should not fail with APZ enabled");
|
||||
return;
|
||||
}
|
||||
APZCTreeManagerChild* derivedProtocol =
|
||||
static_cast<APZCTreeManagerChild*>(baseProtocol);
|
||||
|
||||
|
@ -81,9 +81,15 @@ ContentCompositorBridgeParent::AllocPAPZCTreeManagerParent(
|
||||
return new APZCTreeManagerParent(aLayersId, temp, tempUpdater);
|
||||
}
|
||||
|
||||
// If we do not have APZ enabled, we should gracefully fail.
|
||||
if (!state.mParent->GetOptions().UseAPZ()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
state.mParent->AllocateAPZCTreeManagerParent(lock, aLayersId, state);
|
||||
return state.mApzcTreeManagerParent;
|
||||
}
|
||||
|
||||
bool ContentCompositorBridgeParent::DeallocPAPZCTreeManagerParent(
|
||||
PAPZCTreeManagerParent* aActor) {
|
||||
APZCTreeManagerParent* parent = static_cast<APZCTreeManagerParent*>(aActor);
|
||||
|
Loading…
Reference in New Issue
Block a user