Commit Graph

2961 Commits

Author SHA1 Message Date
Slava Kim
ceea2a1cf2 Pull all imports with css-parse 2014-02-03 21:58:26 -08:00
Avital Oliver
fb446cbe16 Tests for our _.each patch 2014-01-29 14:32:13 -08:00
yeputons
4facd57f5f #1751: add IPv6 loopback check to force-ssl 2014-01-29 13:52:48 -08:00
Avital Oliver
a4b9dd52f3 Fix _.each patch on IE.
The patch was originally introuduced in
bab936eac9
2014-01-29 13:17:34 -08:00
David Glasser
764ceb6077 add a test for observeChanges/limit/initial 2014-01-28 17:44:48 -08:00
David Glasser
25fd3a344c optionify LocalCollection._getRawObjects 2014-01-28 17:44:48 -08:00
David Glasser
9f253e6a0b minimongo: Make update-by-id O(1) 2014-01-28 17:44:48 -08:00
David Glasser
4352b79502 clean up minimongo 'query' object
delete unused fields, rename underscored fields
2014-01-28 15:41:53 -08:00
David Glasser
c8a1df81a7 optimize paused remove({}) which oplog uses 2014-01-28 15:41:53 -08:00
David Glasser
cf3ffa88a9 check for paused earlier 2014-01-28 15:12:14 -08:00
Slava Kim
cb2f2adb1b Do less deep copies 2014-01-28 10:11:27 -08:00
David Glasser
a65b978972 Refactor OplogObserveDriver to use LocalCollection
This should be a good starting point for implementing limit/sort/skip.
2014-01-27 21:57:00 -08:00
David Glasser
980b70596d More comments about our sort inconsistency 2014-01-27 21:56:17 -08:00
David Glasser
782ff1bcae Optionify the barely-used LocalCollection name arg 2014-01-27 21:40:24 -08:00
David Glasser
ed83f00fc1 Rename _SynchronousQueue to _UnyieldingQueue
Allow server uses of LocalCollection to prefer _UnyieldingQueue. This
will mean that, as long as their observeChanges callbacks do not yield,
calls to insert/update/remove will not yield either.
2014-01-27 21:19:32 -08:00
David Glasser
390dafea01 Move _SynchronousQueue into another file
This commit does not build but exists so that the next commit shows
diffs better.
2014-01-27 21:18:24 -08:00
David Glasser
d577b05136 Review of wrapTransform with avital
- move _makeNonreactive into wrapTransform
- Use EJSON.equals for _id comparison
- Return null for nonexistent transforms
- Use isPlainObject for objectness check
- Add unit tests; remove some end-to-end tests

Also, add an EJSON.clone to the recently backported observeHandle._fetch
2014-01-27 16:22:30 -08:00
David Glasser
b5a14c5d30 Initial backport of wrapTransform from shark 2014-01-27 15:25:19 -08:00
David Glasser
20766ac05e Backport observeHandle._fetch from shark 2014-01-27 15:25:19 -08:00
David Glasser
c5e90053f2 Fix bug caused by d868325 2014-01-27 15:22:55 -08:00
David Greenspan
30374854f0 jquery -> v1.10.2 2014-01-27 14:08:22 -08:00
David Greenspan
6300a72381 add missing semicolon
just happened to notice it
2014-01-27 14:02:01 -08:00
David Glasser
d30bb79498 Ensure crossbar callbacks not called after stop
Hopefully fixes #1767.
2014-01-23 23:23:30 -08:00
David Glasser
fca2966676 Simplify crossbar by making it synchronous
All existing listener callbacks were already calling complete()
synchronously, so this should not be a functional change.

This allows us to also eliminate the callback from crossbar.fire().

This in turn allows us to eliminate the `proxy_write` in
Meteor.refresh. The only purpose of that write was to keep the current
write fence open until fire's async callback got called; now that fire
works synchronously, it's not necessary!  (This relies on the fact that
write fences never get armed while they are the current write fence,
which now has an assertion.)
2014-01-23 23:13:42 -08:00
David Glasser
d868325b83 Don't yield in oplog entry handler 2014-01-23 21:53:51 -08:00
David Glasser
8eca012c32 Minor optimizations to new _IdMaps 2014-01-23 21:28:21 -08:00
David Glasser
a7d10d650d Update Node to 0.10.25. Remove bug workaround. 2014-01-23 12:15:29 -08:00
Slava Kim
8b28f1fab6 Change phase and register a fact in the same place 2014-01-22 17:45:24 -08:00
Slava Kim
2952edc73a Merge branch 'oplog-selector-modifier-operators' into devel
- Cache the matchingDocument on Matcher
- Minor cosmetic changes
2014-01-22 15:30:39 -08:00
Slava Kim
9971e5b298 Glasser's comments
- use startsWith for strings rather than x.indexOf(y) && x[y.length] === '.'
- more comments with examples
- consistent naming isSimple => simpleRange, simpleInequality, etc
2014-01-22 15:29:13 -08:00
Slava Kim
1be7e5a900 Initialize Matcher._matchingDocument in the constructor.
To declare it explicitly to humans and JITs.
2014-01-22 14:17:19 -08:00
Slava Kim
4c3c1389ef Some additional facts about oplog-driver 2014-01-21 18:51:08 -08:00
Slava Kim
1c7e222c63 Refactor matchingDocument into separate method on Matcher's prototype, cache it. 2014-01-21 14:02:23 -08:00
Sashko Stubailo
45ccc12970 Make default accounts-ui styling simpler/flatter 2014-01-21 13:57:52 -08:00
Slava Kim
7a528be92d Polish canBecomeTrueByModifier operators optimization
- Fix the pruning `expectedScalarIsObject`
- Limit $gt,$lt,... to numbers only (since there needs to be more logic to support dates and strings later)
- Add comments on dubious parts
2014-01-17 13:28:14 -08:00
Slava Kim
ccdbe31356 Fallback to "YES" in a case of noticeable floating point numbers underflow 2014-01-17 13:28:14 -08:00
Slava Kim
0cfefa63d1 Update the comment in tests section 2014-01-17 13:28:14 -08:00
Slava Kim
3470d00dbc Catch if modifier surely modifies object when scalar expected 2014-01-17 13:28:14 -08:00
Slava Kim
cebd83e1fa Fix the way $in analysis worked 2014-01-17 13:28:14 -08:00
Slava Kim
4f0d2c9a04 More tests 2014-01-17 13:28:14 -08:00
Slava Kim
d026175894 Now Matcher.canBecomeTrueByModifier deals with simple $-operators with scalars:
- $gt, $gte, $lt, $lte
- $ne
- $nin, $in
2014-01-17 13:28:14 -08:00
Slava Kim
80b8fcae2a Fix wrong tests, separate "complex" tests to a separate scope. 2014-01-17 13:28:14 -08:00
Slava Kim
3d8add8d9d Tests for "can selector become true by modifier" for simple $-operators 2014-01-17 13:28:13 -08:00
David Glasser
9513c42291 Change many "maps from stringified ID" to _IdMap
This greatly reduces the number of places in the code where "stringified
IDs" are passed around.

Specifically, changed these maps into _IdMaps:

 - minimongo
   - the main LocalCollection docs map
   - LocalCollection._savedOriginals
   - unordered query results, in several places:
     - query.results
     - query.results_snapshot
     - return value from _getRawObjects
     - as passed to _diffQueryChanges
 - livedata
   - Connection._serverDocuments[collection]
 - mongo-livedata
   - SynchronousCursor._visitedIds
   - return value from SynchronousCursor.getRawObjects
   - PollingObserveDriver._results (when unordered)
2014-01-16 22:33:24 -08:00
Nick Martin
c8acc109f8 Pass through the return value for update and remove on validated operations.
Fixes #1759.
2014-01-15 15:50:17 -08:00
Emily Stark
3c1a06f033 Merge branch 'bp-improvements' into devel 2014-01-15 13:01:10 -08:00
David Glasser
8699a3af94 Throw if $MONGO_OPLOG_URL is not a replset
`new MongoConnection` can now yield. I can't remember why I thought this
would be a problem when first implementing OplogHandle, and it does not
seem to be from initial testing.
2014-01-13 20:26:51 -08:00
Emily Stark
bdf6fd2485 Use regex to replace trailing slashes from browser-policy URLs.
Thanks glasser!
2014-01-13 18:27:58 -08:00
Slava Kim
bc736e4695 Upgrade jquery-waypoints to 2.0.3 2014-01-13 11:50:53 -08:00
Emily Stark
189845f1fb Add frame-src to browser-policy-content. 2014-01-11 20:43:36 -08:00