зеркало из https://github.com/mozilla/gecko-dev.git
Bug 850842 - Make the watchpoint map safe for moving GC; r=billm
--HG-- extra : rebase_source : 6299ee5c5b164b428c3c7e02e03bc204ba5d572b
This commit is contained in:
Родитель
1e0da4f45e
Коммит
3cfd35e261
|
@ -8,6 +8,7 @@
|
|||
#include "jswatchpoint.h"
|
||||
|
||||
#include "gc/Marking.h"
|
||||
#include "gc/StoreBuffer.h"
|
||||
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
|
@ -49,6 +50,15 @@ WatchpointMap::init()
|
|||
return map.init();
|
||||
}
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
void
|
||||
Mark(JSTracer *trc, WatchKey *key, const char *name)
|
||||
{
|
||||
MarkId(trc, &key->id, "WatchKey id");
|
||||
MarkObject(trc, &key->object, "WatchKey id");
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
WatchpointWriteBarrierPost(JSRuntime *rt, WatchpointMap::Map *map, const WatchKey &key,
|
||||
const Watchpoint &val)
|
||||
|
|
|
@ -23,6 +23,10 @@ struct WatchKey {
|
|||
WatchKey(const WatchKey &key) : object(key.object.get()), id(key.id.get()) {}
|
||||
EncapsulatedPtrObject object;
|
||||
EncapsulatedId id;
|
||||
|
||||
bool operator!=(const WatchKey &other) const {
|
||||
return object != other.object || id != other.id;
|
||||
}
|
||||
};
|
||||
|
||||
struct Watchpoint {
|
||||
|
|
Загрузка…
Ссылка в новой задаче