text: "use strict";
  var util = require("./util.js");
  var ASSERT = require("./assert.js");
  var isPrimitive = util.isPrimitive;
  var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
  
  module.exports = function(Promise) {
  var returner = function Promise$_returner() {
      return this;
  };
  var thrower = function Promise$_thrower() {
      throw this;
  };
  
  var wrapper = function Promise$_wrapper(value, action) {
      if (action === THROW) {
          return function Promise$_thrower() {
              throw value;
          };
      } else if (action === RETURN) {
          return function Promise$_returner() {
              return value;
          };
      }
      ASSERT(false);
  };
  
  
  Promise.prototype["return"] =
  Promise.prototype.thenReturn =
  function Promise$thenReturn(value) {
      if (wrapsPrimitiveReceiver && isPrimitive(value)) {
          return this._then(
              wrapper(value, RETURN),
              void 0,
              void 0,
              void 0,
              void 0
         );
      }
      return this._then(returner, void 0, void 0, value, void 0);
  };
  
  Promise.prototype["throw"] =
  Promise.prototype.thenThrow =
  function Promise$thenThrow(reason) {
      if (wrapsPrimitiveReceiver && isPrimitive(reason)) {
          return this._then(
              wrapper(reason, THROW),
              void 0,
              void 0,
              void 0,
              void 0
         );
      }
      return this._then(thrower, void 0, void 0, reason, void 0);
  };
  };
  