Lazily listen for quit-application on the first sync-async call and bail out if the notification is sent while waiting for the callback.
Edward Lee
contributed 15 years ago
|
5d78514057
|
Write setTimeout nsITimer.notify in a way that keeps the timer object alive.
Edward Lee
contributed 15 years ago
|
16d580cbb6
|
Change cb.fail() cb.throw() that also throws the data passed in to stop the caller execution.
Edward Lee
contributed 15 years ago
|
05072bef57
|
Allow async. functions to trigger an exception at the sync. function caller by doing onComplete.fail().
Edward Lee
contributed 15 years ago
|
4274660782
|
Prevent outside access to internal callback data but still allow Sync to access that data.
Edward Lee
contributed 15 years ago
|
36812061e3
|
Add test for passing a "this" to the sync. function and extracting the callback.
Edward Lee
contributed 15 years ago
|
753f023e3a
|
Remove Sync().onComplete functionality changing ability and replace with Sync.withCb().
Edward Lee
contributed 15 years ago
|
86c252fdd0
|
Test using Sync with an async function that takes no arguments.
Edward Lee
contributed 15 years ago
|
50d95db2c4
|
Allow sync. functions to be called more than once and have each sync. invocation instance separate from each other.
Edward Lee
contributed 15 years ago
|
c7d60c5259
|
Give some leeway (5ms) when checking if a function took a certain amount of time to run.
Edward Lee
contributed 15 years ago
|
0fe964922b
|
Remove Function.prototype.sync/bind and Sync.sync and replace with just Sync as the one-simple-great way to make things sync.
Edward Lee
contributed 15 years ago
|
f9c1c37881
|
Test that sync.onComplete allows async functions that indirectly take the callback through its args.
Edward Lee
contributed 15 years ago
|
12f8f30c7b
|
Allow extracting of the sync. function callback to make the sync. call not inject the callback.
Edward Lee
contributed 15 years ago
|
f8bd77382b
|
Add Function.prototype.syncBind to allow binding of this to the sync. function.
Edward Lee
contributed 15 years ago
|
2625a164cc
|
Test the bind form of Sync.sync.
Edward Lee
contributed 15 years ago
|
1902d602f4
|
Add Sync.sync as another way to make sync. functions (in addition to Function.prototype).
Edward Lee
contributed 15 years ago
|
6ec3904ebb
|
Use a shared helper test function to time function execution.
Edward Lee
contributed 15 years ago
|
31e143c6a1
|
Just implement Sync.sleep with sleep.sync instead wrapping it first.
Edward Lee
contributed 15 years ago
|
e914e6d749
|
Directly add additional properties to Sync instead of overwriting __proto__.
Edward Lee
contributed 15 years ago
|
fe9be233b5
|
Change boilerplate of Function.prototype.sync = Sync.sync to just Sync(Function).
Edward Lee
contributed 15 years ago
|
1329d81eba
|
Convert sync to single line comments and lets
Edward Lee
contributed 15 years ago
|
27eaf827b2
|
work around bug in Iceweasel 3.0 that causes it to report its platform version as 1.9 instead of 1.9.0.x
Myk Melez
contributed 15 years ago
|
49c463d4d7
|
test using the Sync.sync method added to the Function prototype to create our own 'synchronous asynchronous' function; simplify Sync.sleep implementation, removing unnecessary callback indirection
Myk Melez
contributed 15 years ago
|
4e15eb9ae3
|
initial implementation of Sync module for doing asynchronous operations in a synchronous fashion
Myk Melez
contributed 15 years ago
|
c8a38f831d
|
rename attr to attribute to make the code a bit clearer
Myk Melez
contributed 15 years ago
|
1fd1b66eb6
|
explain mixing in better
Myk Melez
contributed 15 years ago
|
53862c0a93
|
first version of Mixins module for mixing attributes of one object into another
Myk Melez
contributed 15 years ago
|
ac0aa1e8c1
|
initial support for accessing site-specific preferences in the Preferences module
Myk Melez
contributed 15 years ago
|
d06420992c
|
minor documentation fix
Myk Melez
contributed 15 years ago
|
711c9d86f1
|
improve documentation of JSON module now that it supports all Gecko 1.9.0 applications
Myk Melez
contributed 15 years ago
|
bc932d717f
|
make JSON.js support all Gecko 1.9.0 applications (all of which shipped with JSON.jsm)
Myk Melez
contributed 15 years ago
|
d90ceda77f
|
typo fix
Myk Melez
contributed 15 years ago
|
0f2a23f365
|
JSON module that abstracts incompatible JSON APIs in Firefox 3.0 and 3.5 (for extensions that support both versions)
Myk Melez
contributed 15 years ago
|
1d5c7bd9cf
|
document |set| better
Myk Melez
contributed 15 years ago
|
01a096bcf8
|
make the defaultValue parameter apply to an array of prefs being retrieved with |get|
Myk Melez
contributed 15 years ago
|
b26217d8ce
|
make lock/unlock/locked support arrays of pref names
Myk Melez
contributed 15 years ago
|
720da20d81
|
change modified to isSet and make it support an array of pref names
Myk Melez
contributed 15 years ago
|
f78a4518b3
|
move resetBranch out of the group of preferences that need to be modified to support arrays of pref names
Myk Melez
contributed 15 years ago
|
3b7f02d73b
|
make |has| support an array of pref names
Myk Melez
contributed 15 years ago
|
b700a5ebd6
|
hide and document private properties
Myk Melez
contributed 15 years ago
|
2e905a9717
|
differentiate between the PREF_INVALID pref type and some unknown pref type that we don't know how to handle
Myk Melez
contributed 15 years ago
|
37e6e67cb6
|
make the observers cache a global object to reduce the risk of reference cycles, and only cache an observer once we've successfully added it via the observer service
Myk Melez
contributed 15 years ago
|
f3c0eef9da
|
test that observers get passed the value of the pref that changed
Myk Melez
contributed 15 years ago
|
206c5776a0
|
remove unused code for observing pref branches
Myk Melez
contributed 15 years ago
|
3f4d8d34a9
|
format comment in javadoc style
Myk Melez
contributed 15 years ago
|
fc6423e0bd
|
switch from pref branch observers to pref-specific observers
Myk Melez
contributed 15 years ago
|
1eca31d5b8
|
format comment better
Myk Melez
contributed 15 years ago
|
2d1e4e8c9e
|
throw if an integer pref is outside the PRInt32 range
Myk Melez
contributed 15 years ago
|
4f7ac56ca9
|
warn about numbers that overflow the PRInt32 range
Myk Melez
contributed 15 years ago
|
170a2bd575
|
store pref observers in a global object
Myk Melez
contributed 15 years ago
|
bbe1601f11
|
support observing pref branches
Myk Melez
contributed 15 years ago
|
f836243004
|
format code comments more consistently
Myk Melez
contributed 15 years ago
|
1e49179cc6
|
remove the sdkdir variable, which is not needed by the Makefile
Myk Melez
contributed 15 years ago
|
398daf829a
|
don't set pref values that aren't of type String, Number, or Boolean
Myk Melez
contributed 15 years ago
|
90485dc11d
|
reverse the order in which tail files are evaluated for consistency with the way the xpcshell test harness works
Myk Melez
contributed 15 years ago
|
048a8f2f38
|
warn when converting non-integer number to integer
Myk Melez
contributed 15 years ago
|
40a5705f9d
|
store non-ASCII stings correctly
Myk Melez
contributed 15 years ago
|
f1724d0300
|
reset now accepts an array of pref names to reset, so it shouldn't be in the section of the code labeled 'make the methods below accept an array of pref names'
Myk Melez
contributed 15 years ago
|
afc09a1de3
|
undo recent change of running pref tests manually in a run_test function, as then the output doesn't list each individual test function being run; also, only two of the six tests actually need any cleanup, so now we just make those two tests clean themselves up
Myk Melez
contributed 15 years ago
|
d726f5de6f
|
evaluate tail files in the reverse order from head files, and document that order
Myk Melez
contributed 15 years ago
|
04ab5b4686
|
reset prefs after testing the Preferences module
Myk Melez
contributed 15 years ago
|
8f3703a728
|
factor out code that checks to see if arguments are arrays or objects; add tests to make sure setting/getting single and multiple prefs works; make sure tests use unique pref names so they don't conflict with each other
Myk Melez
contributed 15 years ago
|
82be5a3d17
|
implement resetBranch ourselves, as the current implementation of nsIPrefBranch in Mozilla doesn't implement it for us
Myk Melez
contributed 15 years ago
|
ba233cdb05
|
trap NS_ERROR_UNEXPECTED when calling reset() so callers can unconditionally reset a pref without having to check first that it exists and is in a non-default state (or trap an exception after the fact
Myk Melez
contributed 15 years ago
|
630f7a1ad3
|
ignore temporary files created by the test harness
Myk Melez
contributed 15 years ago
|
a433c9c631
|
report an error and stop if the user hasn't specified the XULRunner executable
Myk Melez
contributed 15 years ago
|
caaacfed40
|
make sure the testing profile directory gets created by the harness correctly
Myk Melez
contributed 15 years ago
|
406e58d95d
|
Added tag Observers-0.2 for changeset 73e238befb04
Myk Melez
contributed 15 years ago
|
dfdade20bf
|
basic functional tests for the Observers module
Myk Melez
contributed 15 years ago
|
3262f6dd0d
|
XULRunner unit test harness for testing the modules
Myk Melez
contributed 15 years ago
|
422c6f9670
|
version 0.2: make Observers.add/remove take optional thisObject parameter; don't pass topic to function/method observers; switch order of topic/subject parameters to Observers.notify; fix bug that sometimes causes an observer of a topic to unregister another observer of the same topic; fix bug that subjects that are JS XPCOM components and have wrappedJSObjects are unwrapped
Myk Melez
contributed 15 years ago
|
ebd6c469fb
|
a StringBundle module to make accessing string bundles from JS modules and components easier
Myk Melez
contributed 16 years ago
|
b24e1e9fc7
|
simplify argument format
Myk Melez
contributed 16 years ago
|
02e338f168
|
a URI module for creating URIs (wraps nsIIOService::newURI)
Myk Melez
contributed 16 years ago
|
c76968148d
|
the Observers module for simpler registration of observers that observe notifications
Myk Melez
contributed 16 years ago
|
8c96c23505
|
space out case chunks to make the code more readable
Myk Melez
contributed 16 years ago
|
42e1ae57de
|
access pref branch constants through the interface rather than an instance
Myk Melez
contributed 16 years ago
|
17e819aeed
|
make it clearer under what circumstances we return the default value of a preference being retrieved
Myk Melez
contributed 16 years ago
|
0e9a3d58ba
|
don't catch exceptions thrown by pref service getters, since we make sure the pref exists before getting it, thus we avoid the known exception on getting a nonexistent pref that the try/catch block was intended to handle; that makes the try/catch block unnecessary, and it's also harmful, since it may suppress other exceptions we want to know about
Myk Melez
contributed 16 years ago
|
94fb5b4e42
|
new implementation of Preferences module
Myk Melez
contributed 16 years ago
|
5d2168ae3b
|