Bug 1288643 - Since we detach now, just check if the object is detached to determine if lost. - r=jerry draft
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 21 Jul 2016 23:41:42 -0700
changeset 391217 8462fbce3df223438b4d8e1fb0557522f57a3e3f
parent 391216 17a88ce695956d75c290afa35f6e30c37fbfd491
child 391218 47081efb41a65a51b3a9b207cc708fd0690ddf1b
push id23845
push userbmo:jgilbert@mozilla.com
push dateFri, 22 Jul 2016 08:40:49 +0000
reviewersjerry
bugs1288643
milestone50.0a1
Bug 1288643 - Since we detach now, just check if the object is detached to determine if lost. - r=jerry MozReview-Commit-ID: CVnjpGroR0w
dom/canvas/WebGLContext.h
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -1594,17 +1594,17 @@ ToSupports(WebGLContext* webgl)
  ** Template implementations
  **/
 
 template<class ObjectType>
 inline bool
 WebGLContext::ValidateObjectAllowDeletedOrNull(const char* info,
                                                ObjectType* object)
 {
-    if (object && !object->IsCompatibleWithContext(this)) {
+    if (object && !object->Context()) {
         ErrorInvalidOperation("%s: object from different WebGL context "
                               "(or older generation of this one) "
                               "passed as argument", info);
         return false;
     }
 
     return true;
 }