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