From 571ecf19fb9846120d98fdc2c36bb4a2b07fca46 Mon Sep 17 00:00:00 2001 From: David Greenspan Date: Fri, 27 Mar 2015 23:20:12 -0700 Subject: [PATCH] Name the variable _workStack better --- packages/blaze/materializer.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/blaze/materializer.js b/packages/blaze/materializer.js index 60958926ca..4986750e05 100644 --- a/packages/blaze/materializer.js +++ b/packages/blaze/materializer.js @@ -7,23 +7,24 @@ // - `intoArray`: the array of DOM nodes and DOMRanges to push the output // into (required) // - `parentView`: the View we are materializing content for (optional) -// - `_workStack`: optional argument, only used for recursive +// - `_existingWorkStack`: optional argument, only used for recursive // calls when there is some other _materializeDOM on the call stack. // If _materializeDOM called your function and passed in a workStack, // pass it back when you call _materializeDOM (such as from a workStack // task). // // Returns `intoArray`, which is especially useful if you pass in `[]`. -Blaze._materializeDOM = function (htmljs, intoArray, parentView, _workStack) { +Blaze._materializeDOM = function (htmljs, intoArray, parentView, + _existingWorkStack) { // In order to use fewer stack frames, materializeDOMInner can push // tasks onto `workStack`, and they will be popped off // and run, last first, after materializeDOMInner returns. The // reason we use a stack instead of a queue is so that we recurse // depth-first, doing newer tasks first. - var workStack = (_workStack || []); + var workStack = (_existingWorkStack || []); materializeDOMInner(htmljs, intoArray, parentView, workStack); - if (! _workStack) { + if (! _existingWorkStack) { // We created the work stack, so we are responsible for finishing // the work. Call each "task" function, starting with the top // of the stack.