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

Issue 963193003: Return error information from pdfium to JS. (Closed)

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

Description

Return error information from pdfium to JS. This implements the previously unimplemented JS_Error() function. Along the way: - fix some IWYU when the include order in global.cpp was perturbed. - remove some uses of JS_ErrorString, to increase transparency. - use vp.IsSetting() in place of !vp.IsGetting() for clarity. - specify an error string on several error return paths. - add an error string for writing readonly properties. - rename an error string constant to reflect the actual message. - replace calls to variadic Format() with a function doing string appends. - remove unused JS_GetClassName() R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/b720d0a14601f1496ef15297bc46d401f5a2a890

Patch Set 1 #

Patch Set 2 : Rename inaccurately named IDS_JSPARAM_INCORRECT #

Patch Set 3 : Tabs #

Patch Set 4 : Fix scope of c_str() #

Total comments: 6

Patch Set 5 : Address comments in #3. #

Patch Set 6 : Tabs. Argh. #

Total comments: 1

Patch Set 7 : Typedefs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -114 lines) Patch
M fpdfsdk/include/javascript/IJavaScript.h View 1 chunk +7 lines, -0 lines 0 comments Download
M fpdfsdk/include/javascript/JS_Define.h View 1 2 3 4 5 6 13 chunks +25 lines, -33 lines 0 comments Download
M fpdfsdk/include/javascript/JS_Object.h View 1 chunk +5 lines, -0 lines 0 comments Download
M fpdfsdk/include/javascript/resource.h View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M fpdfsdk/include/jsapi/fxjs_v8.h View 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/Document.cpp View 1 2 3 4 5 10 chunks +34 lines, -30 lines 0 comments Download
M fpdfsdk/src/javascript/console.cpp View 1 chunk +0 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/global.cpp View 1 2 3 4 3 chunks +8 lines, -6 lines 0 comments Download
M fpdfsdk/src/javascript/resource.cpp View 1 2 3 4 1 chunk +16 lines, -1 line 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8.cpp View 1 2 3 2 chunks +7 lines, -7 lines 0 comments Download
M testing/resources/javascript/document_props.in View 1 chunk +15 lines, -15 lines 0 comments Download
M testing/resources/javascript/document_props_expected.txt View 2 chunks +6 lines, -6 lines 0 comments Download
M testing/resources/javascript/globals.in View 2 chunks +33 lines, -11 lines 0 comments Download
M testing/resources/javascript/globals_expected.txt View 3 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Tom Sepez
Lei, please review. Bruce, FYI. Another step forward for testing sanity.
5 years, 9 months ago (2015-02-27 23:01:09 UTC) #2
Lei Zhang
lgtm with some nits. https://codereview.chromium.org/963193003/diff/60001/fpdfsdk/include/javascript/JS_Define.h File fpdfsdk/include/javascript/JS_Define.h (right): https://codereview.chromium.org/963193003/diff/60001/fpdfsdk/include/javascript/JS_Define.h#newcode50 fpdfsdk/include/javascript/JS_Define.h:50: namespace { I don't think ...
5 years, 9 months ago (2015-02-28 02:50:49 UTC) #3
Tom Sepez
https://codereview.chromium.org/963193003/diff/60001/fpdfsdk/include/javascript/JS_Define.h File fpdfsdk/include/javascript/JS_Define.h (right): https://codereview.chromium.org/963193003/diff/60001/fpdfsdk/include/javascript/JS_Define.h#newcode50 fpdfsdk/include/javascript/JS_Define.h:50: namespace { On 2015/02/28 02:50:49, Lei Zhang wrote: > ...
5 years, 9 months ago (2015-03-02 19:03:44 UTC) #4
Lei Zhang
still lgtm https://codereview.chromium.org/963193003/diff/100001/fpdfsdk/include/javascript/JS_Define.h File fpdfsdk/include/javascript/JS_Define.h (right): https://codereview.chromium.org/963193003/diff/100001/fpdfsdk/include/javascript/JS_Define.h#newcode43 fpdfsdk/include/javascript/JS_Define.h:43: typedef CFX_WideString JS_ErrorString; I thought you were ...
5 years, 9 months ago (2015-03-02 20:13:13 UTC) #5
Tom Sepez
On 2015/03/02 20:13:13, Lei Zhang wrote: > still lgtm > > https://codereview.chromium.org/963193003/diff/100001/fpdfsdk/include/javascript/JS_Define.h > File fpdfsdk/include/javascript/JS_Define.h ...
5 years, 9 months ago (2015-03-02 20:16:27 UTC) #6
Tom Sepez
On 2015/03/02 20:16:27, Tom Sepez wrote: > On 2015/03/02 20:13:13, Lei Zhang wrote: > > ...
5 years, 9 months ago (2015-03-02 20:17:19 UTC) #7
Tom Sepez
5 years, 9 months ago (2015-03-02 20:18:54 UTC) #8
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
b720d0a14601f1496ef15297bc46d401f5a2a890 (tree was closed).

Powered by Google App Engine
This is Rietveld 408576698