Use unique variable names in toplevelPagesDict function.

This commit is contained in:
Kalervo Kujala 2011-09-07 01:17:06 +03:00
parent dca81bdeeb
commit 24babb6536

10
pdf.js
View File

@ -3447,12 +3447,12 @@ var Catalog = (function() {
constructor.prototype = { constructor.prototype = {
get toplevelPagesDict() { get toplevelPagesDict() {
var obj = this.catDict.get('Pages'); var pagesObj = this.catDict.get('Pages');
assertWellFormed(IsRef(obj), 'invalid top-level pages reference'); assertWellFormed(IsRef(pagesObj), 'invalid top-level pages reference');
var obj = this.xref.fetch(obj); var xrefObj = this.xref.fetch(pagesObj);
assertWellFormed(IsDict(obj), 'invalid top-level pages dictionary'); assertWellFormed(IsDict(xrefObj), 'invalid top-level pages dictionary');
// shadow the prototype getter // shadow the prototype getter
return shadow(this, 'toplevelPagesDict', obj); return shadow(this, 'toplevelPagesDict', xrefObj);
}, },
get documentOutline() { get documentOutline() {
function convertIfUnicode(str) { function convertIfUnicode(str) {