Closed Bug 868302 Opened 11 years ago Closed 11 years ago

Enable rooting LIFO assertions in DEBUG

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: sfink, Assigned: sfink)

References

Details

Attachments

(1 file)

When using Maybe<Rooted> stuff, the LIFO properties are nontrivial to maintain. Always-on asserts (well, at least with DEBUG) would be helpful.
Comment on attachment 744999 [details] [diff] [review]
Enable rooting LIFO assertions in DEBUG

This is especially important for browser rooting, since we don't have the dynamic analysis there.
Attachment #744999 - Flags: review?(terrence)
Comment on attachment 744999 [details] [diff] [review]
Enable rooting LIFO assertions in DEBUG

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

Excellent idea! r=me with the name changed.

::: js/src/jspubtd.h
@@ +14,5 @@
>  #include "jsprototypes.h"
>  #include "jstypes.h"
>  
> +#if defined(JSGC_ROOT_ANALYSIS) || defined(JSGC_USE_EXACT_ROOTING) || defined(DEBUG)
> +# define JSGC_ROOT_STACK

This name does not really indicate well what's going on here. How about JSGC_KEEP_EXACT_ROOTS to match JSGC_USE_EXACT_ROOTING?
Attachment #744999 - Flags: review?(terrence) → review+
(In reply to Terrence Cole [:terrence] from comment #3)
> This name does not really indicate well what's going on here. How about
> JSGC_KEEP_EXACT_ROOTS to match JSGC_USE_EXACT_ROOTING?

Actually I guess JSGC_TRACK_EXACT_ROOTS would be even better.
I had some weird problems where my local build worked but tbpl ones didn't, but there was something bizarre going on with my local setup then.

Now this bug is blocked on LIFO bugs it uncovers in the browser rooting, for at least 2 different reasons.
Depends on: 869740
https://hg.mozilla.org/mozilla-central/rev/e61603f64470
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Depends on: 887362
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: