Commit Graph

6568 Commits

Author SHA1 Message Date
David Glasser
583d77e943 Fix Blaze memory leak
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.
2015-04-29 00:35:29 -07:00
David Glasser
91ce1561c3 tracker: implement Computation.onStop
Fixes #3915.
2015-04-29 00:18:13 -07:00
Denis Gorbachev
2f93bf002a blaze: Default to error if it's actually a string
Fixes #4281
2015-04-28 16:26:26 -07:00
Slava Kim
83611e9116 Merge branch 'spacebars-nested-exprs' into devel 2015-04-23 14:27:07 -07:00
Slava Kim
69671f756b Merge branch 'each-in' into devel 2015-04-23 14:24:33 -07:00
Ben Newman
b4f2203c45 Rename reserved identifiers to work with Acorn parser. 2015-04-23 14:42:44 -04:00
ekatek
656a120ada fix spacing on spiderable README 2015-04-23 11:10:07 -07:00
ryneeverett
1bc08a9e76 Allow for multiple projection operators. 2015-04-21 14:58:54 -07:00
ryneeverett
7363766f70 Better error messages for unsupported projection operators. 2015-04-21 14:58:54 -07:00
David Glasser
f7b887ac97 Let users pass a MailComposer object directly
Expose the mailcomposer module on EmailInternals.

Fixes #4209.
2015-04-21 14:03:39 -07:00
Simon Kågedal Reimer
ee60211033 Add note to enter email address.
Unless you enter an email address, the signin will fail and an
error message will be displayed on the consent screen.
2015-04-21 14:01:59 -07:00
Simon Kågedal Reimer
3c893fb787 Update link to Google Developers Console. 2015-04-21 14:01:58 -07:00
David Glasser
a3b44df43b Improve Accounts.createUser error message
Fixes #4206.
2015-04-21 13:44:15 -07:00
David Glasser
471c6d7412 History update, and clean up whitespace 2015-04-21 13:36:47 -07:00
Tom Coleman
d758441cf4 Added throwStubExceptions option to Meteor.call
Allows method simulations to be used as validators and enables freely throwing exceptions in method definitions without worrying about spurious logging on the client.
2015-04-21 13:35:25 -07:00
David Greenspan
5a512ea990 Link to Sudoku demo from README 2015-04-21 11:28:17 -07:00
David Greenspan
4af94c39bd Wordsmithing and fixes 2015-04-20 14:43:34 -07:00
David Greenspan
c6661177f4 Finish TOC 2015-04-20 14:43:33 -07:00
David Greenspan
93e23b4809 Rest of Logic Solver API
Needs final TOC
2015-04-20 14:43:33 -07:00
David Greenspan
2fabf95c92 Rename Solver#minimize to minimizeWeightedSum
Same with maximize.  The old names were too generic for what the
method actually does.
2015-04-20 14:43:33 -07:00
David Greenspan
c65465e215 Fix broken markup 2015-04-20 14:43:33 -07:00
David Greenspan
c3d45ede00 Outline complete table of contents 2015-04-20 14:43:33 -07:00
David Greenspan
03f06295f2 solve and solveAssuming docs 2015-04-20 14:43:33 -07:00
David Greenspan
590446181a Fix stray quote 2015-04-20 14:43:32 -07:00
David Greenspan
c206117c1e Demote "MiniSat" section from beginning to end 2015-04-20 14:43:32 -07:00
David Greenspan
92358119d3 More TOC (and move below Introduction) 2015-04-20 14:43:32 -07:00
David Greenspan
90db08176b Write section on Solver 2015-04-20 14:43:32 -07:00
David Greenspan
b96cedc220 Make Solver#ignoreUnknownVariables a method
in preparation for documenting it
2015-04-20 14:43:32 -07:00
David Greenspan
189eed798a Formula TOC 2015-04-20 14:43:32 -07:00
David Greenspan
66bc7626f2 Document Formulas 2015-04-20 14:43:31 -07:00
David Greenspan
71de34bbf2 More TOC and wordsmithing (TLC) 2015-04-20 14:43:31 -07:00
David Greenspan
2f36eac93b More docs, start TOC 2015-04-20 14:43:31 -07:00
David Greenspan
13312a97b6 Write about Terms 2015-04-20 14:43:31 -07:00
David Greenspan
90982efcc6 De-italicize "variable name" 2015-04-20 14:43:31 -07:00
David Greenspan
b2a8c2f63d Wordsmithing 2015-04-20 14:43:31 -07:00
David Greenspan
698977abf5 Document Variables 2015-04-20 14:43:30 -07:00
David Greenspan
a161fe467d Make noCreate a public 2nd arg to getVarNum 2015-04-20 14:43:30 -07:00
David Greenspan
5f6b0a083a Wordsmithing 2015-04-20 14:43:30 -07:00
David Greenspan
0f749741f7 Minor improvements 2015-04-20 14:43:30 -07:00
David Greenspan
44064263c2 Write a bunch of README text for Logic Solver! 2015-04-20 14:43:30 -07:00
David Greenspan
f6f267d44d Improve Logic.variableBits
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.
2015-04-20 14:43:30 -07:00
David Greenspan
a61deafba1 Update constraint-solver for logic-solver changes 2015-04-20 14:43:30 -07:00
David Greenspan
7855bb87c3 Don't depend on "check", and provide type testers
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.
2015-04-20 14:43:30 -07:00
David Greenspan
dea8d09b80 Define Logic.isNameTerm, etc. type checks
Starting to break dependency on "check"
2015-04-20 14:43:29 -07:00
David Glasser
d310c3e3e6 Upgrade UglifyJS to 2.4.20 from 2.4.17
Fixes #3019.
2015-04-17 12:30:10 -07:00
Robert Lowe
4c1ed1ee20 Refactors #4052 according to @glassers review! 2015-04-14 23:32:20 -07:00
Robert Lowe
f27bcbb3c4 Adds onReady hook to Spiderable package
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`
2015-04-14 23:32:20 -07:00
David Glasser
64c170d6e3 The tool only needs the ddp client
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.
2015-04-14 21:48:41 -07:00
David Glasser
c48ea4affb webapp and routepolicy need no longer be weak deps 2015-04-14 21:34:46 -07:00
David Glasser
6ede690eaa ddp-server does not use faye-websocket directly
(ddp-client does, and sockjs does use it indirectly)
2015-04-14 21:34:46 -07:00