Title: [127945] trunk/Source/WebCore
- Revision
- 127945
- Author
- commit-qu...@webkit.org
- Date
- 2012-09-07 18:09:27 -0700 (Fri, 07 Sep 2012)
Log Message
Check objects for null when recreating context
https://bugs.webkit.org/show_bug.cgi?id=95926
Patch by John Bauman <jbau...@chromium.org> on 2012-09-07
Reviewed by Dean Jackson.
Upon navigation the FrameViwe and other objects may go null, so detect
that and return rather than try to dereference them.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (127944 => 127945)
--- trunk/Source/WebCore/ChangeLog 2012-09-08 00:59:27 UTC (rev 127944)
+++ trunk/Source/WebCore/ChangeLog 2012-09-08 01:09:27 UTC (rev 127945)
@@ -1,3 +1,17 @@
+2012-09-07 John Bauman <jbau...@chromium.org>
+
+ Check objects for null when recreating context
+ https://bugs.webkit.org/show_bug.cgi?id=95926
+
+ Reviewed by Dean Jackson.
+
+ Upon navigation the FrameViwe and other objects may go null, so detect
+ that and return rather than try to dereference them.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore):
+ (WebCore::WebGLRenderingContext::maybeRestoreContext):
+
2012-09-07 Simon Fraser <simon.fra...@apple.com>
box-shadow causes overlay scrollbars to be in the wrong position when element is composited
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (127944 => 127945)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-09-08 00:59:27 UTC (rev 127944)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-09-08 01:09:27 UTC (rev 127945)
@@ -5562,7 +5562,20 @@
break;
}
- RefPtr<GraphicsContext3D> context(GraphicsContext3D::create(m_attributes, canvas()->document()->view()->root()->hostWindow()));
+ Document* document = canvas()->document();
+ if (!document)
+ return;
+ FrameView* view = document->view();
+ if (!view)
+ return;
+ ScrollView* root = view->root();
+ if (!root)
+ return;
+ HostWindow* hostWindow = root->hostWindow();
+ if (!hostWindow)
+ return;
+
+ RefPtr<GraphicsContext3D> context(GraphicsContext3D::create(m_attributes, hostWindow));
if (!context) {
if (m_contextLostMode == RealLostContext)
m_restoreTimer.startOneShot(secondsBetweenRestoreAttempts);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes