New issue
Advanced search Search tips

Issue 620428 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

clearInterval in pdfium Javascript does not clear interval

Project Member Reported by jeanma...@google.com, Jun 15 2016

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 7978.66.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.91 Safari/537.36
Platform: windows

Steps to reproduce the problem:
creating a PDF with the following java script

var interval = app.setInterval("app.alert('this will not stop');",5000);
app.clearInterval(interval);

then open the pdf in chrome

What is the expected behavior?
You should never see the pop up occur because the Interval was cleared before it could trigger.  It should also not keep going

What went wrong?
The PDF keeps showing the pop up ever 5 seconds.

Did this work before? Yes 

Chrome version: 50.0.2661.91  Channel: stable
OS Version: 7978.66.0
Flash Version: Shockwave Flash 21.0 r0

the problem is in app::ClearTimerCommon the first line checks to see if of type CJS_Value::VT_fxobject.  how ever, there is no way for getType() to return CJS_Value::VT_fxobject. 

changing that line to 
if (param.GetType() != CJS_Value::VT_object)

seems to have fixed the problem

faulty line of code
https://cs.chromium.org/chromium/src/third_party/pdfium/fpdfsdk/javascript/app.cpp?rcl=1465989426&l=461
 
bug.pdf
1.1 KB Download
bug.js
103 bytes View Download
It is not blink but rather pdfium.
Cc: tsepez@chromium.org dsinclair@chromium.org weili@chromium.org
Components: -Blink Internals>Plugins>PDF
Labels: OS-Linux OS-Mac OS-Windows
Status: Available (was: Unconfirmed)
Project Member

Comment 3 by sheriffbot@chromium.org, Jun 16 2016

Labels: Hotlist-Google
Just curious, why is this bug restricted?
Labels: -Hotlist-Google
I don't know why it's restricted, I also can't seem to remove the restriction .....
thanks
Owner: tsepez@chromium.org
Status: Fixed (was: Available)
This changes appears to have been made on July 15th. Can you please re-test to verify it's working correctly for you?

https://codereview.chromium.org/2154503002
The restriction is automatic for @google.com addresses + attachments to prevent leaks. The magic to removing the restriction is adding the "allpublic" label.
Labels: allpublic
Can i test it with the dev release build? 
Yes, if you install dev channel, AKA google-chrome-unstable, which is currently 54.0.2816.0.
works fine on the dev build.

Sign in to add a comment