Title: [161924] trunk/Source/WebCore
Revision
161924
Author
bfulg...@apple.com
Date
2014-01-13 17:00:54 -0800 (Mon, 13 Jan 2014)

Log Message

[WebGL] Crash due to forceLostContext
https://bugs.webkit.org/show_bug.cgi?id=126947

Reviewed by Dean Jackson.

Covered by webgl/conformance/textures/origin-clean-conformance.html.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::isContextLost): Make const.
(WebCore::WebGLRenderingContext::platformLayer): Don't attempt to use
a lost context.
* html/canvas/WebGLRenderingContext.h: isContextLost should be const.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161923 => 161924)


--- trunk/Source/WebCore/ChangeLog	2014-01-14 00:53:01 UTC (rev 161923)
+++ trunk/Source/WebCore/ChangeLog	2014-01-14 01:00:54 UTC (rev 161924)
@@ -1,3 +1,18 @@
+2014-01-13  Brent Fulgham  <bfulg...@apple.com>
+
+        [WebGL] Crash due to forceLostContext
+        https://bugs.webkit.org/show_bug.cgi?id=126947
+
+        Reviewed by Dean Jackson.
+
+        Covered by webgl/conformance/textures/origin-clean-conformance.html.
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::isContextLost): Make const.
+        (WebCore::WebGLRenderingContext::platformLayer): Don't attempt to use
+        a lost context.
+        * html/canvas/WebGLRenderingContext.h: isContextLost should be const.
+
 2014-01-13  Martin Robinson  <mrobin...@igalia.com>
 
         [GTK][CMake] WebCorePlatform build can sometimes fail due to missing generated headers

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (161923 => 161924)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2014-01-14 00:53:01 UTC (rev 161923)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2014-01-14 01:00:54 UTC (rev 161924)
@@ -3285,7 +3285,7 @@
     return m_context->isBuffer(buffer->object());
 }
 
-bool WebGLRenderingContext::isContextLost()
+bool WebGLRenderingContext::isContextLost() const
 {
     return m_contextLost;
 }
@@ -4733,7 +4733,7 @@
 #if USE(ACCELERATED_COMPOSITING)
 PlatformLayer* WebGLRenderingContext::platformLayer() const
 {
-    return m_context->platformLayer();
+    return (!isContextLost()) ? m_context->platformLayer() : 0;
 }
 #endif
 

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (161923 => 161924)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h	2014-01-14 00:53:01 UTC (rev 161923)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h	2014-01-14 01:00:54 UTC (rev 161924)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2009, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -187,7 +187,7 @@
 
     void hint(GC3Denum target, GC3Denum mode);
     GC3Dboolean isBuffer(WebGLBuffer*);
-    bool isContextLost();
+    bool isContextLost() const;
     GC3Dboolean isEnabled(GC3Denum cap);
     GC3Dboolean isFramebuffer(WebGLFramebuffer*);
     GC3Dboolean isProgram(WebGLProgram*);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to