changeset 245:b904e0a3ba72 v3

working on promises
author cin
date Fri, 26 Jan 2018 04:13:34 +0300
parents eee3e49dd1ff
children 5aa9cfbe56c3
files Implab/Deferred.cs Implab/IResolvable.cs
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Implab/Deferred.cs	Thu Jan 25 19:09:16 2018 +0300
+++ b/Implab/Deferred.cs	Fri Jan 26 04:13:34 2018 +0300
@@ -36,9 +36,9 @@
 
             else if (m_dispatcher != null)
                 // dispatch (see ecma-262/6.0: 25.4.1.3.2 Promise Resolve Functions)
-                m_dispatcher.Enqueue(() => thenable.Then(this));
+                m_dispatcher.Enqueue(() => Chain(thenable));
             else
-                thenable.Then(this);
+                Chain(thenable);
         }
 
         void Chain(IPromise thenable) {
--- a/Implab/IResolvable.cs	Thu Jan 25 19:09:16 2018 +0300
+++ b/Implab/IResolvable.cs	Fri Jan 26 04:13:34 2018 +0300
@@ -8,8 +8,6 @@
 
         void Resolve();
 
-        void Resolve(IPromise thenable);
-
         /// <summary>
         /// Reject the promise with the specified error.
         /// </summary>