Commit 739924d4 authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 30541: Disable WebGL readPixel() for web content

parent d5fa2cc7
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -1190,6 +1190,14 @@ bool WebGLContext::ReadPixels_SharedPrecheck(CallerType aCallerType,
    return false;
    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)) {
    GenerateWarning("readPixels: Not allowed in Resist Fingerprinting Mode");
    out_error.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
    return false;
  }

  return true;
  return true;
}
}