Closed
Bug 1163059
Opened 10 years ago
Closed 10 years ago
Add a convenience wrapper to Zone for isAtomsZone
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla41
People
(Reporter: terrence, Assigned: terrence)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
The zone contains a direct runtime pointer, so we can make this change without having to worry overly much about performance. It seems to shorten a few call sites and means we don't have to pass a runtime in a couple spots.
Attachment #8603431 -
Flags: review?(sphink)
Comment 1•10 years ago
|
||
Comment on attachment 8603431 [details] [diff] [review]
24.0_add_convenience_isAtomsZone-v0.diff
Review of attachment 8603431 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/gc/Zone.cpp
@@ +77,1 @@
> MOZ_ASSERT(!runtimeFromMainThread()->exclusiveThreadsPresent());
Probably ought to be MOZ_ASSERT_IF, but I'd be shocked if the optimizer didn't make it go away anyway.
::: js/src/jit/VMFunctions.cpp
@@ +1221,5 @@
> AssertValidSymbolPtr(JSContext* cx, JS::Symbol* sym)
> {
> // We can't closely inspect symbols from another runtime.
> + if (sym->runtimeFromAnyThread() != cx->runtime()) {
> + MOZ_ASSERT(sym->isWellKnownSymbol());
That seems like a rather good assertion to have.
::: js/src/vm/Runtime.h
@@ +923,5 @@
> bool isSelfHostingGlobal(JSObject* global) {
> return global == selfHostingGlobal_;
> }
> bool isSelfHostingCompartment(JSCompartment* comp);
> + bool isSelfHostingZone(const JS::Zone* zone);
Make these const.
@@ +1268,5 @@
> return comp == atomsCompartment_;
> }
>
> // The atoms compartment is the only one in its zone.
> + inline bool isAtomsZone(const JS::Zone* zone);
Make this const (though given that it's inline, I imagine the compiler can figure it out.)
Attachment #8603431 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•