Closed
Bug 109183
Opened 24 years ago
Closed 24 years ago
JS_GetClass when called indirectly via the GC should not ClaimScope
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla0.9.7
People
(Reporter: brendan, Assigned: brendan)
Details
(Keywords: js1.5)
Attachments
(1 file, 1 obsolete file)
|
4.45 KB,
patch
|
shaver
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
dbaron found this while jprof'ing new compose window:
69 JS_GetClass
5 js_FinalizeObject
3 js_Interpret
2 JS_CloneFunctionObject
2 JS_TypeOfValue
1 LookupArgOrVar
1 JS_GetPrivate
2241 2 83 js_GetSlotThreadSafe
79 ClaimScope
2 js_LiveContext
He profiled by opening a bunch of compose windows (~40), so js_LiveContext was
hotter than usual. Still, the GC_AWARE_GET_SLOT stuff in jsapi.c that I did
based on jband's report of similar unwarranted ClaimScope activity should be
used by JS_GetClass (and js_FinalizeObject should use it, too).
/be
| Assignee | ||
Comment 1•24 years ago
|
||
Patch coming right up.
/be
Status: NEW → ASSIGNED
Keywords: js1.5,
mozilla0.9.7
Priority: -- → P2
Target Milestone: --- → mozilla0.9.7
| Assignee | ||
Comment 2•24 years ago
|
||
js_FinalizeObject can simply use LOCKED_OBJ_GET_CLASS, as the GC stops all
other JS activity that might race badly to update obj->slots while
js_FinalizeObject is trying to load obj->slots[JSSLOT_CLASS].
/be
Comment 3•24 years ago
|
||
Comment on attachment 57139 [details] [diff] [review]
proposed fix
sr=jband
>+#define GC_AWARE_GET_SLOT(cx,obj,slot) LOCKED_OBJ_GET_SLOT(obj, slot)
could just be?...
#define GC_AWARE_GET_SLOT LOCKED_OBJ_GET_SLOT
You might update the big comment a bit since this is not only probably a 'mark'
anymore.
Attachment #57139 -
Flags: superreview+
| Assignee | ||
Comment 4•24 years ago
|
||
You can't #define BAR FOO and call BAR(x,y,z) when FOO was #defined to take
only two params, e.g.
Comment beefed up a bit.
/be
Attachment #57139 -
Attachment is obsolete: true
| Assignee | ||
Updated•24 years ago
|
Attachment #57180 -
Flags: superreview+
Comment 5•24 years ago
|
||
> You can't #define BAR FOO and call BAR(x,y,z) when FOO was #defined to take
> only two params, e.g.
d'oh. I misread. You *can* get rid of a space before "slot" to make it look like
the lines above. (like it matters :)
| Assignee | ||
Comment 6•24 years ago
|
||
jband: done, thanks (I must have been reading an old-style diff in my haste, I
always try to line things up, given context).
/be
Comment 7•24 years ago
|
||
Comment on attachment 57180 [details] [diff] [review]
revised comment per jband's review
r=shaver.
Attachment #57180 -
Flags: review+
| Assignee | ||
Comment 8•24 years ago
|
||
Fixed.
/be
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•