summaryrefslogtreecommitdiff
path: root/testing/resources/repeat_viewer_ref.in
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2017-03-23 09:45:04 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-23 17:05:05 +0000
commit6bdd824188bc9a2e6b24b5752a3170ce10185c1d (patch)
tree272c426e10e66315ef2993d2d8712029aa6a90b5 /testing/resources/repeat_viewer_ref.in
parent409b663d532d4d6f09a1188fa3b9ac4044708bc4 (diff)
downloadpdfium-6bdd824188bc9a2e6b24b5752a3170ce10185c1d.tar.xz
Fix two CloneNonCycle issues
CloneNonCycle() tries to detect cyclic object references without copying them. There are two issues: -- for elements in an array or a dictionary, they should be able to refer to the same object, which are not cyclic; -- for cyclic referenced elements in an array or a dictionary, do not clone the element at all. Having nullptr or <key, nullptr> as an element, like we did before, might cause crash when the element being accessed. BUG=chromium:701860 Change-Id: Id0304accde76ed06fa5ce640994c7628359600fb Reviewed-on: https://pdfium-review.googlesource.com/3156 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/resources/repeat_viewer_ref.in')
-rw-r--r--testing/resources/repeat_viewer_ref.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/resources/repeat_viewer_ref.in b/testing/resources/repeat_viewer_ref.in
new file mode 100644
index 0000000000..6b436e535f
--- /dev/null
+++ b/testing/resources/repeat_viewer_ref.in
@@ -0,0 +1,19 @@
+{{header}}
+{{object 1 0}}
+<</Names<</JavaScript 2 0 R>>/ViewerPreferences<<
+<</Names<</JavaScript 2 0 R>>/ViewerPreferences<<
+<</Names<</JavaScript 2 0 R>>/ViewerPreferences<<>>
+endobj
+
+{{object 2 0}}
+<</Names[(0) 7 0 R]>>
+endobj
+
+{{object 7 0}}
+<</JS(this.print\({bUI:true,bSilent:false,bShrinkToFit:true}\);)/S/JavaScript>>
+endobj
+
+{{xref}}
+trailer <</Root 1 0 R>>
+{{startxref}}
+%%EOF