function taintMethod(obj, property) {
  Object.defineProperty(obj, property, {
    value: function() {
      $ERROR("Client code can adversely affect behavior: method " + property + ".");
    },
    writable: true,
    enumerable: false,
    configurable: true
  });
}
Taints a named method of the given object by replacing it with a function
that throws an exception.
@param {object} obj the object whose method to taint
@param {string} property the name of the method to taint