Quellcode-Bibliothek InProcessCompositorWidget.cpp
Sprache: C
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Platforms with no OOP compositor process support use // InProcessCompositorWidget by default. #if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING) /* static */
RefPtr<CompositorWidget> CompositorWidget::CreateLocal( const CompositorWidgetInitData& aInitData, const layers::CompositorOptions& aOptions, nsIWidget* 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. For even more sanity-checking, we // do it after the static_cast.
nsBaseWidget* widget = static_cast<nsBaseWidget*>(aWidget);
MOZ_RELEASE_ASSERT(widget); returnnew InProcessCompositorWidget(aOptions, widget);
} #endif
InProcessCompositorWidget::InProcessCompositorWidget( const layers::CompositorOptions& aOptions, nsBaseWidget* aWidget)
: CompositorWidget(aOptions),
mWidget(aWidget),
mCanary(CANARY_VALUE),
mWidgetSanity(aWidget) { // The only method of construction that is used outside of unit tests is // ::CreateLocal, above. That method of construction asserts that mWidget // is not assigned a NULL value. And yet mWidget is NULL in some crash // reports that involve other class methods. Adding a release assert here // will give us the earliest possible notification that we're headed for // a crash.
MOZ_RELEASE_ASSERT(mWidget);
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.