From 1a8e38dbb4e21a2c32beb8e02f6aa50295f596a9 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 17 Oct 2012 17:51:58 +1300 Subject: [PATCH] Bug 776505. Assert that nsDeviceContext is created on the main thread only. r=mats --HG-- extra : rebase_source : fcda449b3bf25c9827c2fa2f000c20460819ce53 --- gfx/src/nsDeviceContext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp index 9c6846f16814..6660cb75e530 100644 --- a/gfx/src/nsDeviceContext.cpp +++ b/gfx/src/nsDeviceContext.cpp @@ -226,6 +226,7 @@ nsDeviceContext::nsDeviceContext() mPixelScale(1.0f), mPrintingScale(1.0f), mFontCache(nullptr) { + MOZ_ASSERT(NS_IsMainThread(), "nsDeviceContext created off main thread"); } // Note: we use a bare pointer for mFontCache so that nsFontCache