This leak occured whenever a DOM element with attributes got removed
from the DOM without destroying its containing view. For example, an
element in an `{{#if}}` whose condition is toggled back and forth; a
single Blaze.View is used for the `{{#if}}` as its condition changes.
The retention chain was as follows:
The element was saved in the `elem` variable of `materializeTag` in
materializer.js.
Among other places, `elem` was saved in the `attrUpdater` in that
function, which is used by the `updateAttributes` function.
This function is passed to `view.autorun`, which registered this
`onViewDestroyed` handler:
self.onViewDestroyed(function () { locals.c.stop(); });
That callback retains a references to the computation, and thus to the
DOM element.
Before this commit, that onViewDestroyed callback is not removed from
the Blaze.View when the computation is stopped (eg, because the DOM
element is removed from the DOM, triggering
`updaterComputation.stop()`), so in this case the DOM element is leaked.
(This still has a tiny leak in that you end up with lots of nulls
inside `_callbacks.destroyed`; using a better data structure for
callbacks is a game for another day.)
Fixes#4289.
Allows method simulations to be used as validators and enables freely throwing exceptions in method definitions without worrying about spurious logging on the client.
check that the second argument is present
generate better variable names. the generated
names don't have to be magic -- we will probably
document what they are -- but they should be a
little better than just appending a number.
it's reasonable to give variables names like
"1,1", and appending a 0 to that would make
"1,10", which is weird. "1,1$0" is better.
The dependency on "check" was a real buzz-kill, especially when we
think of this package as something someone might run outside Meteor:
* `check` is really slow (mainly due to using exceptions for control
flow, I think), giving you a choice of *either* argument-checking or
good performance out of the box
* `check` pulls in the `ejson` and `base64` packages
Type testers are functions like `Logic.isTerm`, which are much more
useful to have as part of the public API than "matchers" like
`Logic.Term` in the old code.
Resolves#3824
Adds missing `DDP` dependancy
Adds `callback-hook` for onReady hook registration
Adds some client tests for `Spiderable`
Bumps version to `1.0.8`
However, turns out the previous commit doesn't really work --- making
webapp a strong dependency of ddp-server means that as soon as we load
mongo we'll load webapp in the tool which is bad. So move the mongodb
Npm module out of mongo, since that's all we need in the tool.