Commit a76f2ce8 authored by Yehuda Katz's avatar Yehuda Katz

Slight cleanup

parent 2a43d27b
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
var browserGlobal = (typeof window !== 'undefined') ? window : {}; var browserGlobal = (typeof window !== 'undefined') ? window : {};
// Extract this into its own library
var MutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; var MutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var async; var async;
...@@ -137,9 +136,7 @@ var Promise = exports.Promise = function() { ...@@ -137,9 +136,7 @@ var Promise = exports.Promise = function() {
}, this); }, this);
}; };
var throwException = function() { var noop = function() {};
//throw new Error("You cannot resolve this Promise because it has already been resolved.");
};
var invokeCallback = function(type, promise, callback, event) { var invokeCallback = function(type, promise, callback, event) {
var value, error; var value, error;
...@@ -190,8 +187,8 @@ Promise.prototype = { ...@@ -190,8 +187,8 @@ Promise.prototype = {
this.isResolved = value; this.isResolved = value;
}, this); }, this);
this.resolve = throwException; this.resolve = noop;
this.reject = throwException; this.reject = noop;
}, },
reject: function(value) { reject: function(value) {
...@@ -200,8 +197,8 @@ Promise.prototype = { ...@@ -200,8 +197,8 @@ Promise.prototype = {
this.isRejected = value; this.isRejected = value;
}, this); }, this);
this.resolve = throwException; this.resolve = noop;
this.reject = throwException; this.reject = noop;
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment