Closed
Bug 490072
Opened 17 years ago
Closed 16 years ago
Rewrite XPCOM unit tests to use new synchronization API
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: cjones, Assigned: cjones)
References
Details
Attachments
(2 files, 1 obsolete file)
|
19.38 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
|
1.81 KB,
text/plain
|
Details |
Where possible. It's a good test of the new code, and we should be guaranteeing that old XPCOM stuff works with the new sync primitives. Depends on bug 456272 because I don't trust the hack job I made of the old deadlock detector as part of bug 58904.
Let's see if porky.py is up to this job...
| Assignee | ||
Comment 1•17 years ago
|
||
| Assignee | ||
Comment 2•17 years ago
|
||
And BTW, thanks porky.py!
Comment 3•17 years ago
|
||
Comment on attachment 377362 [details] [diff] [review]
First cut, awaiting tryserver approval
Looks good! I noticed one thing when glancing through this...
- nsAutoLock guard(gLock);
+ MutexAutoLock guard(*gLock);
When rewriting this pattern the tools seem to consistently put two spaces between the type and the variable name. Is that intentional?
| Assignee | ||
Comment 4•17 years ago
|
||
(In reply to comment #3)
> (From update of attachment 377362 [details] [diff] [review])
> Looks good! I noticed one thing when glancing through this...
>
> - nsAutoLock guard(gLock);
> + MutexAutoLock guard(*gLock);
>
> When rewriting this pattern the tools seem to consistently put two spaces
> between the type and the variable name. Is that intentional?
Oops, no. Let me check into this ...
| Assignee | ||
Comment 5•17 years ago
|
||
Fixed up some porky bugs, regenerated.
Attachment #377362 -
Attachment is obsolete: true
Attachment #377493 -
Flags: review?(benjamin)
| Assignee | ||
Comment 6•17 years ago
|
||
For future reference, the steps I took to generate the patch were:
(1) Run the porky rewrite on preprocessed firefox source
(2) Apply the generated patch
(3) Compile the unit tests, fix errors
- all tests needed to have |#include "mozilla/..."; using namespace mozilla;| added by hand, since neither porky nor pork supports this yet
- porky doesn't rewrite constructor expressions well yet; |nsAutoLock _(lockPtr)| was rewritten to |MutexAutoLock _(lockPtr)|, but needed to be |MutexAutoLock _(*lockPtr)|. I fixed this by hand.
(4) Fiddle with whitespace glitches, such as the table-alignment of class members being screwed up
Updated•17 years ago
|
Attachment #377493 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 7•16 years ago
|
||
Pushed
b43beeb87f15 Chris Jones - bug 490072: upgrade XPCOM unit tests to new thread sync API. drop nsAutoLock test. r=bsmedberg
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•