Last Comment Bug 684527 - make sure that new GC things are not allocated from finalizers.
: make sure that new GC things are not allocated from finalizers.
: perf
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla9
Assigned To: Igor Bukanov
: Jason Orendorff [:jorendorff]
Depends on: 681884
  Show dependency treegraph
Reported: 2011-09-03 12:16 PDT by Igor Bukanov
Modified: 2011-09-21 02:59 PDT (History)
9 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (8.26 KB, patch)
2011-09-20 13:45 PDT, Igor Bukanov
wmccloskey: review+
Details | Diff | Splinter Review

Description User image Igor Bukanov 2011-09-03 12:16:19 PDT
This is a followup for the bug 681884 comment 6. ArenaLists::refillFreeList, , contains:

     * For compatibility with older code we tolerate calling the allocator
     * during the GC in optimized builds.
    JSRuntime *rt = cx->runtime;
    if (rt->gcRunning)
        return NULL;

As that check is done each time we refil the free list it does not come for free. We should remove that and fix the broken callers that tries to allocate during the GC from finalizers or the GC callback.
Comment 1 User image Igor Bukanov 2011-09-20 13:45:08 PDT
Created attachment 561288 [details] [diff] [review]

The patch removes rt->gcRunning check from  ArenaLists::refillFreeList. It was not necessary to make the try server green. 

Besides that check the patch also passes JSCompartment *, not JSContext *, to various helper methods that refillFreeList calls. It emphasis that error reporting is only done in refil and makes my other patches smaller.
Comment 2 User image Bill McCloskey (:billm) 2011-09-20 14:27:27 PDT
Comment on attachment 561288 [details] [diff] [review]

Comment 4 User image Marco Bonardo [::mak] 2011-09-21 02:59:41 PDT

Note You need to log in before you can comment on or make changes to this bug.