提交 d6a553ed 编写于 作者: J Johannes Rieken

add an assertion to check that our maps are in sync

上级 19829be6
......@@ -97,6 +97,9 @@ export class MarkerService implements IMarkerService {
// remove marker for this (owner,resource)-tuple
const a = MapMap.remove(this._byResource, resource.toString(), owner);
const b = MapMap.remove(this._byOwner, owner, resource.toString());
if (a !== b) {
throw new Error('invalid marker service state');
}
if (a && b) {
this._onMarkerChanged.fire([resource]);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册