summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 20:46:26 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 20:46:26 +0000
commitdc8972518c98e03ef4a898831f18367fbffddbf9 (patch)
tree9fc2652c6d1d4c2db114980ff7eb935c36fb6b9d /webkit/support
parent0f1d9284549ec8535a99989ca5f5e0ac80b2f6e7 (diff)
downloadchromium_src-dc8972518c98e03ef4a898831f18367fbffddbf9.zip
chromium_src-dc8972518c98e03ef4a898831f18367fbffddbf9.tar.gz
chromium_src-dc8972518c98e03ef4a898831f18367fbffddbf9.tar.bz2
Return a NULL WebGraphicsContext3DProvider for NULL ContextProvider.
Instead of passing a WebGraphicsContext3DProvider with a NULL ContextProvider inside it, which we will then deref when asked for the WGContext3D*. For the impl thread the ContextProvider is always non-null, but for the main thread, the provider factory will try to initialize the context and return no ContextProvider at all if it failed. NOTRY=true R=jamesr BUG=240305 Review URL: https://chromiumcodereview.appspot.com/15094008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/test_webkit_platform_support.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc
index 8d4bd7c..ae5784b 100644
--- a/webkit/support/test_webkit_platform_support.cc
+++ b/webkit/support/test_webkit_platform_support.cc
@@ -396,6 +396,8 @@ WebKit::WebGraphicsContext3DProvider* TestWebKitPlatformSupport::
main_thread_contexts_ =
webkit::gpu::TestContextProviderFactory::GetInstance()->
OffscreenContextProviderForMainThread();
+ if (!main_thread_contexts_)
+ return NULL;
return new webkit::gpu::WebGraphicsContext3DProviderImpl(
main_thread_contexts_);
}