MCPcopy
hub / github.com/koodo-reader/koodo-reader / getNewPersistentRef

Method getNewPersistentRef

public/lib/pdfjs/pdf.worker.mjs:58211–58218  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

58209 this._persistentRefsCache = null;
58210 }
58211 getNewPersistentRef(obj) {
58212 if (this._newPersistentRefNum === null) {
58213 this._newPersistentRefNum = this.entries.length || 1;
58214 }
58215 const num = this._newPersistentRefNum++;
58216 this._cacheMap.set(num, obj);
58217 return Ref.get(num, 0);
58218 }
58219 getNewTemporaryRef() {
58220 if (this._newTemporaryRefNum === null) {
58221 this._newTemporaryRefNum = this.entries.length || 1;

Callers 3

fontDescriptorRefMethod · 0.80
descendantFontRefMethod · 0.80
baseFontRefMethod · 0.80

Calls 2

setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected