some gc fixes
This commit is contained in:
parent
c72f62ecb6
commit
01031d27c3
@ -198,6 +198,7 @@ module.exports = function (Y/* :any */) {
|
|||||||
length = 0
|
length = 0
|
||||||
} else {
|
} else {
|
||||||
// does exist, check if it is too long
|
// does exist, check if it is too long
|
||||||
|
if (!target.deleted) {
|
||||||
if (target.id[1] < targetId[1]) {
|
if (target.id[1] < targetId[1]) {
|
||||||
// starts to the left of the deletion range
|
// starts to the left of the deletion range
|
||||||
target = yield* this.getInsertionCleanStart(targetId)
|
target = yield* this.getInsertionCleanStart(targetId)
|
||||||
@ -208,6 +209,7 @@ module.exports = function (Y/* :any */) {
|
|||||||
target = yield* this.getInsertionCleanEnd([targetId[0], targetId[1] + length - 1])
|
target = yield* this.getInsertionCleanEnd([targetId[0], targetId[1] + length - 1])
|
||||||
targetLength = target.content.length
|
targetLength = target.content.length
|
||||||
}
|
}
|
||||||
|
}
|
||||||
length = target.id[1] - targetId[1]
|
length = target.id[1] - targetId[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,7 +491,7 @@ module.exports = function (Y/* :any */) {
|
|||||||
*/
|
*/
|
||||||
* garbageCollectOperation (id) {
|
* garbageCollectOperation (id) {
|
||||||
this.store.addToDebug('yield* this.garbageCollectOperation(', id, ')')
|
this.store.addToDebug('yield* this.garbageCollectOperation(', id, ')')
|
||||||
var o = yield* this.getInsertion(id) // TODO! like this? or rather cleanstartend
|
var o = yield* this.getOperation(id) // TODO! like this? or rather cleanstartend
|
||||||
yield* this.markGarbageCollected(id, (o != null && o.content != null) ? o.content.lengh : 1) // always mark gc'd
|
yield* this.markGarbageCollected(id, (o != null && o.content != null) ? o.content.lengh : 1) // always mark gc'd
|
||||||
// if op exists, then clean that mess up..
|
// if op exists, then clean that mess up..
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user