Commit Graph

77 Commits

Author SHA1 Message Date
Richard Newman
a30e4fc05d Bug 690170 - Part 2: clean up Resource and friends now we've found the culprit. r=philikon 2011-10-28 14:43:18 -07:00
Richard Newman
483f04dd06 Bug 690170 - Part 1: Fix channel management to avoid nsIHTTPChannel.responseStatus => NS_ERROR_NOT_AVAILABLE in Sync HTTP requests. r=philikon 2011-10-28 14:43:18 -07:00
Richard Newman
accee938cb Bug 685945 - Sync: log a warning if JSON parsing of bodies fails. r=philikon 2011-10-06 01:47:02 -07:00
Richard Newman
a09a981984 Bug 672878 - temporary shim to log inconsistent state in ChannelListener.onStopRequest. r=philikon 2011-09-22 10:14:13 -07:00
Philipp von Weitershausen
d5cdd620c7 Bug 682449 - Strict mode SyntaxError: redefining delete is deprecated. r=rnewman 2011-08-26 16:39:04 -07:00
Richard Newman
c2274d4bad Bug 664865 - More considered handling of node reassignment mid-sync. r=philikon 2011-06-25 14:54:50 +01:00
Philipp von Weitershausen
229e2fb292 Bug 661587 - Don't use the root logger. r=rnewman 2011-06-13 20:42:18 +02:00
Philipp von Weitershausen
22ea6b3488 Bug 662178 - Simplify timed callbacks. r=rnewman 2011-06-06 21:27:36 +02:00
Richard Newman
7fea1fb259 Move Resource.serverTime to AsyncResource, fix comments for AsyncResource. r=philiKON 2011-05-30 19:01:25 -07:00
Richard Newman
aafbc961f8 Move async utilities into async.js. Add Async.makeSpinningCallback as a temporary shim for wrapping Cb versions of functions. r=philiKON 2011-05-30 19:01:13 -07:00
Richard Newman
d1269997d2 Bug 656708: Channel.URI is undefined. r=philiKON 2011-05-30 14:21:03 -07:00
Philipp von Weitershausen
623c1b8ddb Bug 648364 - Remove dead code. r=rnewman 2011-05-19 18:09:02 -07:00
Philipp von Weitershausen
b9e5cfec8c Bug 648364 - Replace custom helpers with XPCOMUtils.jsm. r=rnewman 2011-05-19 18:08:35 -07:00
Philipp von Weitershausen
fcdbbd407d Bug 648364 - Replace custom helpers with Services.jsm. r=rnewman 2011-05-19 18:08:07 -07:00
Richard Newman
5f7c62e369 Bug 652182: eliminate Resource status == 0 check missed in landing of Bug 623080. r=philiKON 2011-04-22 12:13:17 -07:00
Richard Newman
ce17b7a63f Bug 568156: more Sync UA tweaks. r=philiKON 2011-04-08 13:43:38 -07:00
Richard Newman
ebad0b7d80 Bug 568156: Use Sync client version as User-Agent. r=philiKON 2011-04-07 13:55:02 -07:00
Richard Newman
24661bb861 Bug 623836: part 1: use lowercase headers where we're supposed to. r=philiKON 2011-04-06 16:12:21 -07:00
Richard Newman
18a08f8197 Bug 623080: make Resource more loggy and robust. r=mconnor 2011-04-01 15:27:19 -07:00
Richard Newman
ea1a2a3f31 Bug 623836: part 0: simplify Resource.setHeader. r=philiKON 2011-03-30 18:28:56 -07:00
Philipp von Weitershausen
1f7cda2d3b Bug 636402 - Simplify Sync.js to avoid creating new objects. r=rnewman a=blocking-fennec 2011-02-25 14:43:18 -08:00
Philipp von Weitershausen
e4fb12b994 Bug 591102 - Ensure exceptions from [Async]Resource contain the status code. r=mconnor 2011-01-31 20:55:48 -08:00
Philipp von Weitershausen
c4eeaa669b Bug 609421 - Combine auth.js and resource.js. r=rnewman 2011-01-18 16:23:38 -08:00
Richard Newman
f1e01b223f Bug 624019: log exceptions, not just their stacktrace, in onDataAvailable. r=philiKON 2011-01-07 14:30:16 -08:00
Richard Newman
f95d79ea92 Bug 622760: log exceptions thrown in _onProgress callbacks. r=philiKON 2011-01-04 16:27:00 -08:00
Richard Newman
574331f73c Bug 619162: default resource success is false; retry once. r=philiKON 2010-12-20 12:47:51 -08:00
Philipp von Weitershausen
4bdc1e4c27 Bug 603301 - Add async resource API. [r=mconnor]
The async API is exposed as AsyncResource which is functionally equivalent to Resource.
The latter is now a wrapper around AsyncResource.
2010-10-29 10:20:27 -07:00
Philipp von Weitershausen
7a82914881 Bug 580672 - Implement quota UI (Part 1) [r=mconnor]
Recognize quota warnings from server, implement API calls to retrieve quota information.
2010-09-11 18:39:21 +02:00
Edward Lee
830b170d96 Bug 570636 - Decide how to co-exist as a sync add-on and built-in sync [r=mconnor]
Map the modules directory to services-sync instead of weave and update imports.
2010-06-16 14:30:08 -07:00
Edward Lee
aa78231812 Bug 568136 - Migration requires client to check for a node again after a 401 [r=mconnor]
Allow observers to watch for resource 401s and to specify a new uri to request. Test to make sure "weave:resource:status:401" gets notified and resource handles uri changes.
2010-06-03 18:37:07 -07:00
Philipp von Weitershausen
d33e73e4f6 Bug 557596 - code audit and create unit test plan for resource.js [r=mconnor]
Lots of resource tests, Resource.serverTime initialized to null, Resource.headers normalized to lowercase.
2010-06-01 15:15:53 -07:00
Edward Lee
0f7583cc58 Bug 560184 - Proxy authentication: Initial Weave connection attempt doesn't time out [r=mconnor]
Delay the abort timer from the constructor in addition to onStartRequest and onDataAvailable in-case the callbacks never get called.
2010-04-21 11:10:21 -07:00
Edward Lee
cf8d361e6a Bug 550627 - Default reconciliation to server wins for older changed items [r=mconnor]
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
2010-04-01 15:54:53 -07:00
Edward Lee
2d8626cf11 Bug 544532 - Weave won't sync after resume from standby [r=mconnor]
Start an abortTimer onStartRequest and refresh the timer on each onDataAvailable only to cancel on an onStopRequest. If the timer triggers, the sync/async call will be aborted.
2010-04-01 15:25:47 -07:00
Edward Lee
395b714710 Bug 545764 - Convert constructor -> _init pattern to just use constructor
Inline various _init calls and do super's init with <Super>.call(this, args..). Add various get/set sugar to those missing e.g., meta.keyring. Also simplify crypto record creation by setting cleartext in the parent.
2010-02-11 15:25:31 -08:00
Edward Lee
f4fd59f8ce Bug 535722 - Reduce the amount of logging for default log levels
Include the URI on success/fail requests and only trace log the onStartRequest. Switch various debug messages to trace and remove importing Log4Moz in fx-weave-overlay and generic-change. Drop the rootLogger to Debug to not log trace messages from unpreffed loggers.
2009-12-17 18:51:55 -08:00
Edward Lee
0835511bf5 Remove trailing whitespace from the codebase. 2009-11-20 14:34:20 -08:00
Mike Connor
c06e17ff75 bug 511549 - make detailedStatus much smarter about errors and backoff, r=edilee 2009-09-15 21:38:52 -04:00
Edward Lee
a370c3ee40 Chop off the end of long URIs for debug output onStartRequest. 2009-09-11 14:52:27 -07:00
Edward Lee
976d5514bb Remove some unnecessary logs that follow right after the notify/event now that we only show verbose. Only log non-success response body for Trace. 2009-09-10 22:57:36 -07:00
Edward Lee
bae93fdb61 Bug 515676 - Allow giving objects to PUT/POST without Filters to avoid stringify([parse(stringify(stringify(obj)))])
Get rid of Filters and automatically JSON.stringify PUT/POST data that aren't strings, so plain Records can be passed in to PUT and POST. This leverages toJSON of Records to provide an object that can be serialized. Fix up client record serialize/deserialize to still escape/unescape non-ASCII.
2009-09-10 11:05:13 -07:00
Edward Lee
c3472cb15f Bug 515678 - Provide a smart getter to get the object representation of a JSON Resource response
Always allow getting an object representation of potentially JSON response for any Resource instead of explicitly on filterDownload. Update existing Resource GETs that manually parse the response. This prevents the String response from accidentally toString()ing a filteredDownload that converted to a different type.
2009-09-10 11:04:36 -07:00
Edward Lee
02d4d48115 Bug 511746 - Resource.foo shouldn't throw except in exceptional cases. r=thunder
Get rid of lastChannel and return a String object from _request with additional properties of status, succeeded, headers -- even if the response was handled by cache. Update engines to check for non-success and throw the failure. Update tests to use these additional properties instead of lastChannel, etc.
2009-08-26 15:32:46 -07:00
Edward Lee
ed89623557 Backed out changeset 129ca9a54aed due to burning
test_auth_manager:      FAIL
test_resource:  FAIL
2009-08-26 01:50:36 -07:00
Anant Narayanan
4e0ddac991 Change Resource.get() semantics and support X-Weave-Alert (bug #478330) 2009-08-26 00:05:57 -07:00
Edward Lee
651badb65c Bug 510152 - Check for failure onStopRequest and throw the error for extra debugging
Wrap the error code with a JS Error to track the stack, and re-wrap it to get the full stack trace. Also, remove args for __request for the stack because it's sometimes the whole record..
2009-08-12 20:28:46 -07:00
Edward Lee
5778bb9436 Bug 485573 - Fennec runs out of memory and crashes if too many history items to sync. r=thunder
Incrementally process records as the collection finds record boundaries and converts them to records for the engine to use. Get rid of the collection iterator and original RecordParser. Add tests for incremental record parsing and remove old iter tests.
2009-07-22 16:38:34 -07:00
Edward Lee
0d842644e1 Debug log the size of PUT/POSTs messages. 2009-07-14 13:59:46 -07:00
Edward Lee
e8a4268525 Strip newline from various debug output. 2009-07-09 17:44:41 -07:00
Edward Lee
2720fec5a7 merge weave. resolve comments added to resource.js. 2009-07-09 11:21:20 -07:00