clearInterval in pdfium Javascript does not clear interval |
||||||
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
,
Jun 15 2016
,
Jun 16 2016
,
Jul 29 2016
Just curious, why is this bug restricted?
,
Aug 2 2016
,
Aug 2 2016
I don't know why it's restricted, I also can't seem to remove the restriction .....
,
Aug 2 2016
thanks
,
Aug 3 2016
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
,
Aug 3 2016
The restriction is automatic for @google.com addresses + attachments to prevent leaks. The magic to removing the restriction is adding the "allpublic" label.
,
Aug 3 2016
,
Aug 3 2016
Can i test it with the dev release build?
,
Aug 3 2016
Yes, if you install dev channel, AKA google-chrome-unstable, which is currently 54.0.2816.0.
,
Aug 3 2016
works fine on the dev build. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by jeanma...@google.com
, Jun 15 2016