Bug 914437 - Also refuse to render when our view is not attached to a window. r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Wed, 09 Oct 2013 10:39:23 -0400
changeset 165465 8952c5133a67746de3e60a6c4ae3e9a20a7a02ef
parent 165464 1c7c44b9f29f9743b5160a193bb6f40c0d39bbbf
child 165466 30cead16670909c56c2cd39198812e3e17fc8ddd
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs914437
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 914437 - Also refuse to render when our view is not attached to a window. r=mattwoodrow
widget/cocoa/nsChildView.mm
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -2872,18 +2872,19 @@ NSEvent* gLastDragMouseDownEvent = nil;
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 - (bool)preRender:(NSOpenGLContext *)aGLContext
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
 
-  if ([[self window] isKindOfClass:[BaseWindow class]] &&
-      ![(BaseWindow*)[self window] isVisibleOrBeingShown]) {
+  if (![self window] ||
+      ([[self window] isKindOfClass:[BaseWindow class]] &&
+       ![(BaseWindow*)[self window] isVisibleOrBeingShown])) {
     // Before the window is shown, our GL context's front FBO is not
     // framebuffer complete, so we refuse to render.
     return false;
   }
 
   if (!mGLContext) {
     [self setGLContext:aGLContext];
     [self updateGLContext];