01ab15a6f1
Currently the `getPageIndex` method will happily return `0`, even if the `Ref` parameter doesn't actually point to a proper /Page dictionary. Having the API trust that the consumer is doing the right thing seems error-prone, hence this patch which adds a check for this case. Given that the `Catalog_getPageIndex` method isn't used in any hot part of the codebase, this extra check shouldn't be a problem. (Note: in the standard viewer, it is only ever used from `PDFLinkService_navigateTo` if a destination needs to be resolved during document loading, which isn't common enough to be an issue IMHO.) |
||
---|---|---|
.. | ||
annotation_layer_spec.js | ||
api_spec.js | ||
cff_parser_spec.js | ||
cmap_spec.js | ||
crypto_spec.js | ||
dom_utils_spec.js | ||
evaluator_spec.js | ||
function_spec.js | ||
jasmine-boot.js | ||
metadata_spec.js | ||
network_spec.js | ||
parser_spec.js | ||
primitives_spec.js | ||
stream_spec.js | ||
testreporter.js | ||
type1_parser_spec.js | ||
ui_utils_spec.js | ||
unicode_spec.js | ||
unit_test.html | ||
util_spec.js |