Commit 06952630 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Fix TestHandleMapPointerLayout test case of x86_64.

parent 7e3cd3eb
......@@ -55,9 +55,6 @@ func (me *HandleMap) Count() int {
}
func (me *HandleMap) Register(obj *Handled) (handle uint64) {
if obj.check != 0 {
panic("Object already has a handle.")
}
me.mutex.Lock()
defer me.mutex.Unlock()
......@@ -83,6 +80,9 @@ func (me *HandleMap) Register(obj *Handled) (handle uint64) {
handle |= uint64(check) << 32
}
if obj.check != 0 {
panic("Object already has a handle.")
}
obj.check = check
me.handles[handle] = obj
return handle
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment