Sean Wilkinson avatar Sean Wilkinson committed 42f2eac

Access `comm` by name instead of by reference

Comments (0)

Files changed (1)

                 that[key] = obj[key];
             }
         }
-        that.comm = function (obj) {
+        that.comm = function comm(obj) {
          // This function provides a mechanism for manipulating the internal
          // state of an avar without providing direct access to that state. It
          // was inspired by the message-passing style used in Objective-C.
                         return;
                     });
                 } else {
-                    that.comm({'fail': 'Transformation must be a function.'});
+                    comm({'fail': 'Transformation must be a function.'});
                 }
                 break;
             case 'done':
              // A computation involving this avar has succeeded, and we will
              // now prepare to run the next computation that depends on it by
-             // transferring it into the `revive` queue.
+             // transferring it from the avar's individual queue into the
+             // global `queue` used by the `revive` function.
                 state.ready = true;
                 if (state.queue.length > 0) {
                     state.ready = false;
                  // immediately.
                     state.onerror = args[1];
                     if (state.epitaph !== null) {
-                        that.comm({'fail': state.epitaph});
+                        comm({'fail': state.epitaph});
                     }
                 }
                 break;
              // else a user is re-programming Quanah's guts; in either case, it
              // may be useful to capture the error. Another possibility is that
              // a user is trying to trigger `revive` using an obsolete idiom
-             // that involved calling `that.comm` without any arguments.
-                that.comm({'fail': 'Invalid `comm` message "' + message + '"'});
+             // that involved calling `comm` without any arguments.
+                comm({'fail': 'Invalid `comm` message "' + message + '"'});
             }
             return revive();
         };
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.