зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1466633 - GCManagedDeletePolicy: do not clear edges during GC, r=jonco
--HG-- extra : source : 17bb0a45975b93c4003e4436706e3caf7c44d9fd extra : histedit_source : d267abd514731d4664de12e6b4c2bd6666732dd9
This commit is contained in:
Родитель
0596b8022c
Коммит
5ed1fd1a2f
|
@ -7,6 +7,7 @@
|
|||
#ifndef gc_DeletePolicy_h
|
||||
#define gc_DeletePolicy_h
|
||||
|
||||
#include "gc/Barrier.h"
|
||||
#include "js/TracingAPI.h"
|
||||
#ifdef ENABLE_BIGINT
|
||||
#include "vm/BigIntType.h"
|
||||
|
@ -73,8 +74,13 @@ struct GCManagedDeletePolicy
|
|||
void operator()(const T* constPtr) {
|
||||
if (constPtr) {
|
||||
auto ptr = const_cast<T*>(constPtr);
|
||||
if (JS::CurrentThreadIsHeapCollecting()) {
|
||||
MOZ_ASSERT(js::CurrentThreadIsGCSweeping());
|
||||
// Do not attempt to clear out storebuffer edges.
|
||||
} else {
|
||||
gc::ClearEdgesTracer trc;
|
||||
ptr->trace(&trc);
|
||||
}
|
||||
js_delete(ptr);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче