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

Issue 1084183008: Remove unused nParamNum values from JS method tables. (Closed)

Created:
5 years, 8 months ago by Tom Sepez
Modified:
5 years, 7 months ago
Reviewers:
Lei Zhang, brucedawson
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Remove unused nParamNum values from JS method tables. The code to validate the number of parameters happens inside each particular method, rather than prior to method dispatch. As such, there's no point in having this number take up space in the table. Add some test to cover at least some of the per-method validations, and update error messages to be more useful.

Patch Set 1 #

Patch Set 2 : Add expected result file. #

Patch Set 3 : Tabify #

Patch Set 4 : More tabify. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+646 lines, -189 lines) Patch
M fpdfsdk/include/javascript/JS_Define.h View 6 chunks +6 lines, -8 lines 0 comments Download
M fpdfsdk/include/javascript/resource.h View 1 chunk +2 lines, -0 lines 0 comments Download
M fpdfsdk/include/jsapi/fxjs_v8.h View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/Document.cpp View 1 2 3 10 chunks +104 lines, -94 lines 1 comment Download
M fpdfsdk/src/javascript/Field.cpp View 1 chunk +26 lines, -26 lines 0 comments Download
M fpdfsdk/src/javascript/PublicMethods.cpp View 1 chunk +22 lines, -22 lines 0 comments Download
M fpdfsdk/src/javascript/app.cpp View 1 chunk +21 lines, -21 lines 0 comments Download
M fpdfsdk/src/javascript/color.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/console.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M fpdfsdk/src/javascript/global.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/javascript/report.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/resource.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M fpdfsdk/src/javascript/util.cpp View 1 chunk +5 lines, -5 lines 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
A testing/resources/javascript/document_methods.in View 1 chunk +340 lines, -0 lines 0 comments Download
A testing/resources/javascript/document_methods_expected.txt View 1 1 chunk +103 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Tom Sepez
Lei, for review.
5 years, 8 months ago (2015-04-23 21:57:32 UTC) #2
Lei Zhang
lgtm
5 years, 8 months ago (2015-04-24 00:46:24 UTC) #3
Tom Sepez
Landed at ef25d9995e494bd596ffea8fb8c09c2e48daa9a0 (There was an error automatically updating this codereview page).
5 years, 8 months ago (2015-04-24 00:53:18 UTC) #4
Tom Sepez
Lei, for review. Some small details in the bug.
5 years, 8 months ago (2015-04-24 17:36:52 UTC) #5
Tom Sepez
On 2015/04/24 17:36:52, Tom Sepez wrote: > Lei, for review. Some small details in the ...
5 years, 8 months ago (2015-04-24 17:37:28 UTC) #6
brucedawson
https://codereview.chromium.org/1084183008/diff/60001/fpdfsdk/src/javascript/Document.cpp File fpdfsdk/src/javascript/Document.cpp (right): https://codereview.chromium.org/1084183008/diff/60001/fpdfsdk/src/javascript/Document.cpp#newcode639 fpdfsdk/src/javascript/Document.cpp:639: CJS_Context* pContext = (CJS_Context*)cc; This newly added pContext variable ...
5 years, 7 months ago (2015-05-01 17:16:37 UTC) #8
Tom Sepez
5 years, 7 months ago (2015-05-01 17:19:27 UTC) #9
Message was sent while issue was closed.
> There is no bug, but the variable shadowing adds some confusion and should
> probably be corrected.
> 
> This was found by /analyze in build 163.

Filed as https://code.google.com/p/pdfium/issues/detail?id=148

Powered by Google App Engine
This is Rietveld 408576698