I think this patch depends on a corresponding gecko patch, right?  This code will throw an exception if run on a version of gecko that does not support white balance.  Please make it do a console.warn() or console.error() instead of throwing an exception.  Either catch the exception, or test for the properties  whiteBalanceModes and whiteBalanceMode before using them.