Reorganize ifdefs and cleanup dtor in vm/ForkJoin.cpp

RESOLVED FIXED in mozilla22

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: nmatsakis, Unassigned)

Tracking

Trunk
mozilla22
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Peeling off two unrelated patches that are blocking bug 829602 into their own bug.
(Reporter)

Comment 1

5 years ago
Created attachment 726633 [details] [diff] [review]
NULL out the lock field and check it in the destructor.
Attachment #726633 - Flags: review?(wmccloskey)
(Reporter)

Comment 2

5 years ago
Created attachment 726635 [details] [diff] [review]
Adjust ifdef strategy

Make it clearer what happens JS_THREADSAFE is not enabled, and also do the same when JS_ION is not enabled, since ion is effectively required for any sort of parallel execution.
Attachment #726635 - Flags: review?(wmccloskey)
(Reporter)

Updated

5 years ago
Blocks: 829602
Attachment #726633 - Flags: review?(wmccloskey) → review+
Comment on attachment 726635 [details] [diff] [review]
Adjust ifdef strategy

Review of attachment 726635 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/vm/ForkJoin.cpp
@@ +19,5 @@
>  #endif
>  
> +#if defined(JS_THREADSAFE) && defined(JS_ION)
> +#  define JS_THREADSAFE_ION
> +#endif

There's no need for this indirection, just do:

#if defined(JS_THREADSAFE) && defineD(JS_ION)

real implementation

#else

dummy implementation

#endif
Attachment #726635 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/51313f09b4da
https://hg.mozilla.org/mozilla-central/rev/ccb23fd0cfd7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.