gecko/services/sync/modules
Atul Varma 7d98a5dbeb Added a few log messages to hopefully make the debugging of generators easier. Also added an id component to generators, which is part of their name, to help distinguish between concurrent instances of the same generator function. The following debug output represents the new logging infomation:
--
Async.Generator	DEBUG	 runTestGenerator-0: self.cb generated at test_async_missing_yield.js:28
Async.Generator	DEBUG	 secondGen-1: self.cb generated at test_async_missing_yield.js:20
Async.Generator	DEBUG	 secondGen-1: done() called.
Async.Generator	DEBUG	 runTestGenerator-0: self.cb() called, resuming coroutine.
Async.Generator	DEBUG	 runTestGenerator-0: done() called.
Async.Generator	DEBUG	 secondGen-1: self.cb() called, resuming coroutine.
Async.Generator	DEBUG	 secondGen-1: done() called.
Async.Generator	ERROR	 Async method 'secondGen-1' is missing a 'yield' call (or called done() after being finalized)
--

As you can see, I've added log messages whenever the Generator's 'cb' property is accessed--this is almost guaranteed to be very close to a 'yield' statement, and therefore provides us with a decently accurate idea of where the generator 'stopped'.  We also log a message when the generator continues, and by doing so we get an idea of how the coroutines interleave.

Another idea I had was to actually match calls to self.cb with calls to 'yield' to automatically detect e.g. two yields in a row (which will ordinarily result in a generator 'hanging'), a generator exiting while a self.cb still hasn't been called, but I'm not sure what kinds of reprecussions it may have.
2008-06-11 18:58:30 -07:00
..
engines bug 430363: ignore remove commands when generating deltas for history so the deltas file on the server doesn't grow too large; r=thunder 2008-06-11 10:40:24 -07:00
xmpp imported patch xmpp-transport-fault-tolerance-and-test 2008-06-04 18:34:37 -07:00
async.js Added a few log messages to hopefully make the debugging of generators easier. Also added an id component to generators, which is part of their name, to help distinguish between concurrent instances of the same generator function. The following debug output represents the new logging infomation: 2008-06-11 18:58:30 -07:00
constants.js - this check in will break everyone temporarily, as it involves the changes necessary to shift us from sha1(email) to usernames, and to enable sharing on the server. 2008-06-06 14:18:50 -07:00
crypto.js make service.js the main entry point from chrome/content; make the service be lazy-loaded; make crypto be lazy-loaded 2008-03-25 15:14:00 -07:00
dav.js Added a POST method to dav.js. 2008-06-09 17:36:54 -07:00
engines.js bug 437529: yield after starting to put the status file to the server so we don't finalize the sync until the PUT request completes 2008-06-11 17:44:08 -07:00
faultTolerance.js Added a trivial appender to faultTolerance.js. 2008-05-30 16:32:06 -07:00
identity.js change remote store to keep track of identity names/aliases and fetch the objects from the id manager 2008-06-02 11:10:11 +09:00
log4moz.js Refactored logging system so that clients don't need to call factory functions to create specific instances of formatters and appenders. 2008-05-29 18:15:50 -07:00
remote.js fix typo in recent checkin that broke appending deltas to the deltas file on the server 2008-06-11 14:14:04 -07:00
service.js bug 438033: implement a better first-run wizard process; r=myk 2008-06-11 17:56:02 -07:00
sharing.js Added modules/sharing.js, which provides access to the RESTful sharing API, and a unit test suite. The unit test suite is pretty heinous right now and should get a bit of refactoring. 2008-06-09 18:55:26 -07:00
stores.js Moved all tab-syncing code to modules/engines/tabsjs. 2008-06-03 14:45:53 -07:00
syncCores.js Moved all tab-syncing code to modules/engines/tabsjs. 2008-06-03 14:45:53 -07:00
trackers.js Moved all tab-syncing code to modules/engines/tabsjs. 2008-06-03 14:45:53 -07:00
util.js Refactoring: made a new function, Utils.makeTimerForCall(), which is used by test suites and async.js. 2008-06-09 19:30:11 -07:00
wrap.js [mostly] beat login dialog into submission; use DAV singleton instead of making a new DAVCollection in service.js; split up checks from login into their own functions, call them on sync(); check we are logged in before syncing 2008-03-31 07:20:09 -07:00
xxtea.js move xxxtea.js -> xxtea.js (typo) 2007-12-27 12:50:51 -08:00