diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 20:46:26 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-13 20:46:26 +0000 |
commit | dc8972518c98e03ef4a898831f18367fbffddbf9 (patch) | |
tree | 9fc2652c6d1d4c2db114980ff7eb935c36fb6b9d /webkit/support | |
parent | 0f1d9284549ec8535a99989ca5f5e0ac80b2f6e7 (diff) | |
download | chromium_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.cc | 2 |
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_); } |