Skip to content

Commit fd1fea5

Browse files
committed
Remove some useless operations when getting the text content
The removed code has been added in #20624 and it's useless since these operations (i.e. save/restore) are already handled in preprocessor.read.
1 parent 1f94023 commit fd1fea5

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/core/evaluator.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3197,6 +3197,9 @@ class PartialEvaluator {
31973197
break;
31983198
}
31993199

3200+
// preprocessor.read() already handles save, restore and transform
3201+
// operations, so we don't need to worry about them here.
3202+
32003203
textState = stateManager.state;
32013204
currentTextState ||= textState.clone();
32023205
const fn = operation.fn;
@@ -3570,12 +3573,6 @@ class PartialEvaluator {
35703573
});
35713574
}
35723575
break;
3573-
case OPS.restore:
3574-
stateManager.restore();
3575-
break;
3576-
case OPS.save:
3577-
stateManager.save();
3578-
break;
35793576
} // switch
35803577
if (textContent.items.length >= (sink?.desiredSize ?? 1)) {
35813578
// Wait for ready, if we reach highWaterMark.

0 commit comments

Comments
 (0)