Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: testing/resources/bug_634716.in

Issue 2221513002: Remove another potential stale CJS_Timer usage (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: tidy pdf Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/javascript/app.cpp ('k') | testing/resources/bug_634716.pdf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 {{header}}
2 {{object 1 0}} <<
3 /Type /Catalog
4 /Pages 2 0 R
5 /AcroForm 6 0 R
6 /Names <</JavaScript 13 0 R>>
7 >>
8 endobj
9 {{object 2 0}} <<
10 /Type /Pages
11 /Count 1
12 /Kids [4 0 R]
13 >>
14 endobj
15 {{object 4 0}} <<
16 /Type /Page
17 /Parent 2 0 R
18 /MediaBox [0 0 612 792]
19 /CropBox [0 0 612 792]
20 /Resources <<>>
21 >>
22 endobj
23 {{object 6 0}} <<
24 /DR <<
25 /Font <</Helv 7 0 R>>
26 >>
27 /DA (/Helv 0 Tf 0 g)
28 /Fields [5 0 R]
29 >>
30 endobj
31 {{object 7 0}} <<
32 /Type /Font
33 /Subtype /Type1
34 /BaseFont /Helvetica
35 /Encoding /WinAnsiEncoding
36 >>
37 endobj
38 {{object 8 0}} <<
39 /Type /XObject
40 /Subtype /Form
41 /FormType 1
42 /Matrix [1 0 0 1 0 0]
43 /BBox [0 0 75.907 28.472]
44 /Resources <<
45 /Font <</FXF0 7 0 R>>
46 >>
47 >>
48 stream
49 q
50 Q
51
52
53 endstream
54 endobj
55 {{object 11 0}} <<
56 /Type /Action
57 /S /JavaScript
58 /JS 50 0 R
59 >>
60 endobj
61 {{object 13 0}} <<
62 /Names [(startDelay) 11 0 R]
63 >>
64 endobj
65 {{object 50 0}} <<
66 >>
67 stream
68 var timeOut = 0;
69 var array = new Array(1024*4);
70 var doc = this;
71
72 function myFunction() {
73 try {
74 // Free the Timer Objects
75 app.clearTimeOut(timeOut);
76 for (var i=0; i<array.length; i++) {
77 for (var j=0; j<array[i].length; j++) {
78 app.clearTimeOut(array[i][j]);
79 }
80 }
81
82 // Trigger the Garbage Collection
83 array.length = 0;
84 array.push(new ArrayBuffer(1024*1024));
85 array.length=0;
86 array.length=1024*4;
87 var str = 'AA';
88 for (var i = 0; i < array.length ; i++) {
89 for (var j = 0; j < 10; j++ ) {
90 doc.addIcon(str + "-" + str + str + str + str + str, doc.icons);
91 }
92 }
93 } catch(err) {
94 app.alert(err);
95 }
96 }
97
98 function main() {
99 try {
100 for (var i = 0; i < array.length ; i++) {
101 if (i == array.length / 2) {
102 timeOut = app.setTimeOut("myFunction()", 1000);
103 }
104 array[i] = new Array(4);
105 for (var j = 0; j < array[i].length ; j++ ) {
106 array[i][j] = app.setTimeOut("aaaaaaaaaa()", 100000);
107 }
108 }
109 } catch(err) {
110 app.alert(err);
111 }
112 }
113
114 // Execute the JS.
115 app.setTimeOut("main()", 1000);
116
117 // Be sure all of this code ran to completion.
118 app.alert("done");
119 endstream
120 endobj
121 {{xref}}
122 trailer <<
123 /Root 1 0 R
124 >>
125 {{startxref}}
126 %%EOF
OLDNEW
« no previous file with comments | « fpdfsdk/javascript/app.cpp ('k') | testing/resources/bug_634716.pdf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698