Closed
Bug 743854
Opened 14 years ago
Closed 14 years ago
GC: extra barriers in ArrayBuffer::create
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: terrence, Assigned: terrence)
Details
Attachments
(1 file, 1 obsolete file)
|
1.42 KB,
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
ArrayBuffers have 16 inline slots that the typearray uses to store arbitrary data. Out of ArrayBuffer::create we end up calling JSObject::create, which calls initializeSlotRange, which calls init() on each of the 16 inline slots. The post barrier puts a reference to each of these in the write buffer. The typearray code goes on to write arbitrary data to these slots. When we GC, we attempt to figure out if these values contain a GCThing and potentially dereference the "pointers" stored there. These contain garbage: kaboom.
| Assignee | ||
Comment 1•14 years ago
|
||
Simple, but ugly. I'm not sure if it would be worth adding a special class flag for only this one case.
Attachment #613440 -
Flags: review?(wmccloskey)
Is there any way we can do this without loading the class from the shape? Most of the callers I see already have the class in a local variable.
| Assignee | ||
Comment 3•14 years ago
|
||
This code already calls shape->getObjectClass()->getPrivate() in the branch immediately above this one. We should just store that and re-use it.
| Assignee | ||
Comment 4•14 years ago
|
||
Bill, I talked this over with Waldo and sfink this morning. Slotspan is just used differently by ArrayBuffers, so it seems that doing this specialization is the right way to go for now.
Attachment #613440 -
Attachment is obsolete: true
Attachment #613440 -
Flags: review?(wmccloskey)
Attachment #624446 -
Flags: review?(wmccloskey)
Comment on attachment 624446 [details] [diff] [review]
v1: Keep the Class in a shared local.
OK, but please call it clasp.
Attachment #624446 -
Flags: review?(wmccloskey) → review+
| Assignee | ||
Comment 6•14 years ago
|
||
Comment 7•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in
before you can comment on or make changes to this bug.
Description
•