Fetch all indirect objects (i.e. Ref
s) in NameTree_getAll
and NameTree_get
(issue 6204)
This commit is contained in:
parent
367794f0c7
commit
28f40b1b58
@ -1408,7 +1408,7 @@ var NameTree = (function NameTreeClosure() {
|
||||
var names = obj.get('Names');
|
||||
if (names) {
|
||||
for (i = 0, n = names.length; i < n; i += 2) {
|
||||
dict[names[i]] = xref.fetchIfRef(names[i + 1]);
|
||||
dict[xref.fetchIfRef(names[i])] = xref.fetchIfRef(names[i + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1447,9 +1447,9 @@ var NameTree = (function NameTreeClosure() {
|
||||
var kid = xref.fetchIfRef(kids[m]);
|
||||
var limits = kid.get('Limits');
|
||||
|
||||
if (destinationId < limits[0]) {
|
||||
if (destinationId < xref.fetchIfRef(limits[0])) {
|
||||
r = m - 1;
|
||||
} else if (destinationId > limits[1]) {
|
||||
} else if (destinationId > xref.fetchIfRef(limits[1])) {
|
||||
l = m + 1;
|
||||
} else {
|
||||
kidsOrNames = xref.fetchIfRef(kids[m]);
|
||||
@ -1473,9 +1473,9 @@ var NameTree = (function NameTreeClosure() {
|
||||
// Check only even indices (0, 2, 4, ...) because the
|
||||
// odd indices contain the actual D array.
|
||||
m = (l + r) & ~1;
|
||||
if (destinationId < names[m]) {
|
||||
if (destinationId < xref.fetchIfRef(names[m])) {
|
||||
r = m - 2;
|
||||
} else if (destinationId > names[m]) {
|
||||
} else if (destinationId > xref.fetchIfRef(names[m])) {
|
||||
l = m + 2;
|
||||
} else {
|
||||
return xref.fetchIfRef(names[m + 1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user