bug 881261 r=bz
authorDavid Zbarsky <dzbarsky@gmail.com>
Wed, 12 Jun 2013 13:04:18 -0700
changeset 146339 c2030303c7d7efba45e521fde39ddeb09f19cbca
parent 146338 2810e80e1393bbc47c438871ae6a826621880a9a
child 146340 f850d84e4bb58e704ea8ce601c10308bc5d88462
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs881261
milestone24.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 881261 r=bz
content/canvas/src/WebGLContext.cpp
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -312,18 +312,19 @@ WebGLContext::Invalidate()
 //
 
 NS_IMETHODIMP
 WebGLContext::SetContextOptions(JSContext* aCx, JS::Handle<JS::Value> aOptions)
 {
     if (aOptions.isNullOrUndefined() && mOptionsFrozen) {
         return NS_OK;
     }
+
     WebGLContextAttributes attributes;
-    attributes.Init(aCx, aOptions);
+    NS_ENSURE_TRUE(attributes.Init(aCx, aOptions), NS_ERROR_UNEXPECTED);
 
     WebGLContextOptions newOpts;
 
     newOpts.stencil = attributes.mStencil;
     newOpts.depth = attributes.mDepth;
     newOpts.premultipliedAlpha = attributes.mPremultipliedAlpha;
     newOpts.antialias = attributes.mAntialias;
     newOpts.preserveDrawingBuffer = attributes.mPreserveDrawingBuffer;