Bug 850842 - Make the watchpoint map safe for moving GC; r=billm

--HG--
extra : rebase_source : 6299ee5c5b164b428c3c7e02e03bc204ba5d572b
This commit is contained in:
Terrence Cole 2013-03-13 15:12:24 -07:00
Родитель 1e0da4f45e
Коммит 3cfd35e261
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -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 {