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

Issue 908033002: Replace ugly JS_Define macros with templates (Closed)

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

Description

Replace ugly JS_Define macros with templates. This allows us to step through the JS bindings code with the debugger, which I could not do (but wanted to) the other day. In the process, get rid of some else after returns, and one unreachable code path. I also get rid of some tracing macros that we would never use for the sake of clarity, and some plain unused definitions. R=brucedawson@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/a96cc9bffc200d4ea83c2a283ca3ac0b72e9a588

Patch Set 1 #

Patch Set 2 : Rebase, tidy #

Patch Set 3 : Don't re-create generated pdf file. #

Total comments: 2

Patch Set 4 : Rebase, kill the IsEmpty() checks. #

Patch Set 5 : kill more unused #defines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -214 lines) Patch
M fpdfsdk/include/javascript/JS_Define.h View 1 2 3 4 8 chunks +127 lines, -214 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Tom Sepez
Lei, for your consideration.
5 years, 10 months ago (2015-02-13 20:52:21 UTC) #2
Lei Zhang
https://codereview.chromium.org/908033002/diff/40001/fpdfsdk/include/javascript/JS_Define.h File fpdfsdk/include/javascript/JS_Define.h (right): https://codereview.chromium.org/908033002/diff/40001/fpdfsdk/include/javascript/JS_Define.h#newcode498 fpdfsdk/include/javascript/JS_Define.h:498: if (v.IsEmpty()) { Can we ever hit this? If ...
5 years, 10 months ago (2015-02-14 00:00:15 UTC) #4
brucedawson
I'd rather see the expanding of the macros as a separate (presumably mechanical) change in ...
5 years, 10 months ago (2015-02-16 20:42:00 UTC) #5
Tom Sepez
On 2015/02/16 20:42:00, brucedawson wrote: > I'd rather see the expanding of the macros as ...
5 years, 10 months ago (2015-02-17 19:57:00 UTC) #6
Tom Sepez
Please take another look.
5 years, 10 months ago (2015-02-17 21:39:51 UTC) #7
brucedawson
It is difficult to verify that the behavior is unchanged, but in all my checks ...
5 years, 10 months ago (2015-02-17 22:43:30 UTC) #8
Tom Sepez
5 years, 10 months ago (2015-02-18 20:42:57 UTC) #9
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
a96cc9bffc200d4ea83c2a283ca3ac0b72e9a588 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698