Bug 1674142 Part 2: Upgrade to a release assert in CompositorWidget::CreateLocal. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D103943
This commit is contained in:
Brad Werth 2021-02-03 22:10:24 +00:00
Родитель cd2514ec74
Коммит ac6e9cb106
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -21,7 +21,10 @@ namespace widget {
RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
const CompositorWidgetInitData& aInitData,
const layers::CompositorOptions& aOptions, nsIWidget* aWidget) {
MOZ_ASSERT(aWidget);
// We're getting crashes from storing a NULL mWidget, and this is the
// only remaining explanation that doesn't involve memory corruption,
// so placing a release assert here.
MOZ_RELEASE_ASSERT(aWidget);
# ifdef MOZ_WIDGET_ANDROID
return new AndroidCompositorWidget(aOptions,
static_cast<nsBaseWidget*>(aWidget));