New issue
Advanced search Search tips

Issue 872893 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 828577



Sign in to add a comment

PDF XFA: Implement console.show()

Project Member Reported by hnakashima@chromium.org, Aug 9

Issue description

console.show() is not in the XFA spec, but it is used by some documents in the wild since Adobe Acrobat supports it. We should at least fail silently instead of throwing a JS error and stopping the script execution.
 
To repro, on an XFA-enabled build:

1. Open the attached imm5257e_filled_dummy.pdf.
2. Press the Validate button.
Expected: No JS error messages.
Actual: In debug, a message saying "JS Error: TypeError: console.show is not a function" appears.
imm5257e_filled_dummy.pdf
662 KB Download
"console" is defined by V8. It can be overridden with an instance that contains "show". Not sure if this is actually necessary to make this form's validation work, since it's in the catch block.
Blocking: -62400 -867135 828577
I don't think anymore this should block XFA, though it would avoid breaking scripts that have console.show() calls left from debugging.
Status: Fixed (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 28

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/3321f15291b3fff3ebd6ef41bf48d883c8b78352

commit 3321f15291b3fff3ebd6ef41bf48d883c8b78352
Author: Henrique Nakashima <hnakashima@chromium.org>
Date: Tue Aug 28 20:19:03 2018

Make built-in JS console compatible with Adobe's console.

console.show() and console.println() are calls commonly found in XFA
scripts. This CL adds methods to the built-in V8 console so these calls
do not stop the rest of script from running.

Bug:  chromium:872893 
Change-Id: I661f505176884558ae2d658312d561a28767ae25
Reviewed-on: https://pdfium-review.googlesource.com/41533
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>

[modify] https://crrev.com/3321f15291b3fff3ebd6ef41bf48d883c8b78352/fxjs/cfxjse_context.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb3c30b40ba63e507e14fec90f46308874c76f25

commit fb3c30b40ba63e507e14fec90f46308874c76f25
Author: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Tue Aug 28 23:27:05 2018

Roll src/third_party/pdfium 7e4fff716338..4d92af5ace49 (2 commits)

https://pdfium.googlesource.com/pdfium.git/+log/7e4fff716338..4d92af5ace49


git log 7e4fff716338..4d92af5ace49 --date=short --no-merges --format='%ad %ae %s'
2018-08-28 rharrison@chromium.org Handle non-printing characters at beginning of extraction region
2018-08-28 hnakashima@chromium.org Make built-in JS console compatible with Adobe's console.


Created with:
  gclient setdep -r src/third_party/pdfium@4d92af5ace49

The AutoRoll server is located here: https://autoroll.skia.org/r/pdfium-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:872893 
TBR=dsinclair@chromium.org

Change-Id: I2b51dad9614a60f8bac8b694873e843bfb1a39fb
Reviewed-on: https://chromium-review.googlesource.com/1194672
Reviewed-by: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#586926}
[modify] https://crrev.com/fb3c30b40ba63e507e14fec90f46308874c76f25/DEPS

Sign in to add a comment