Commit 130660ce authored by Georg Koppen's avatar Georg Koppen Committed by Matthew Finkel
Browse files

Bug 30541: Disable WebGL readPixel() for web content

parent 8e31d798
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4619,6 +4619,14 @@ bool ClientWebGLContext::ReadPixels_SharedPrecheck(
    return false;
  }

  // Security check passed, but don't let content readPixel calls through for
  // now, if Resist Fingerprinting Mode is enabled.
  if (nsContentUtils::ResistFingerprinting(aCallerType)) {
    JsWarning("readPixels: Not allowed in Resist Fingerprinting Mode");
    out_error.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
    return false;
  }

  return true;
}