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

Issue 1367033002: Pass v8::Isolate to PDFium at init time. (Closed)

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

Description

Pass v8::Isolate to PDFium at init time. Move the external isolate and embedder slot from the IPDF_JSPlatforms struct supplied at the FPDFDOC_InitFormFillEnvironment() call time to arguments to the FPDF_InitLibraryWithConfig() call. This has several benefits: -- Avoids the crash that could happen if multiple FPDFDOC_InitFormFillEnvironmen() calls should happen to be made by an embedder with different slot values. -- Down the road, for XFA, there may be XFA but no FormFill environment. We support both forms for the time being, until the chrome side catches up, at which point we will deprecate the old way. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/3dedace9623fef6161a8666e53a4ab2b9be61e4c

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Tidy comments. #

Patch Set 4 : missing ! #

Patch Set 5 : Rebase #

Patch Set 6 : Fix layering. #

Patch Set 7 : fix leak, clear globals while we're at it. #

Total comments: 8

Patch Set 8 : kill include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -48 lines) Patch
M fpdfsdk/include/javascript/JS_Runtime.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -2 lines 0 comments Download
M fpdfsdk/include/jsapi/fxjs_v8.h View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Runtime.cpp View 1 2 3 4 5 1 chunk +10 lines, -15 lines 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8.cpp View 1 2 3 4 5 6 3 chunks +30 lines, -10 lines 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M public/fpdf_formfill.h View 1 2 1 chunk +5 lines, -10 lines 0 comments Download
M public/fpdfview.h View 2 chunks +12 lines, -1 line 0 comments Download
M samples/pdfium_test.cc View 1 2 3 2 chunks +10 lines, -8 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
Tom Sepez
For discussion purposes.
5 years, 2 months ago (2015-09-29 16:00:47 UTC) #2
raymes
Hey Tom, could you explain this a bit? Does it solve the problem of freeing ...
5 years, 2 months ago (2015-09-30 01:21:43 UTC) #3
raymes
Ohh sorry I just saw your notes in the bug :) I see it's not ...
5 years, 2 months ago (2015-09-30 01:22:19 UTC) #4
Tom Sepez
Ready for review: jochen, thestig, raymes.
5 years, 2 months ago (2015-10-02 18:14:27 UTC) #5
Lei Zhang
https://codereview.chromium.org/1367033002/diff/110001/fpdfsdk/include/javascript/JS_Runtime.h File fpdfsdk/include/javascript/JS_Runtime.h (right): https://codereview.chromium.org/1367033002/diff/110001/fpdfsdk/include/javascript/JS_Runtime.h#newcode13 fpdfsdk/include/javascript/JS_Runtime.h:13: #include "../../../third_party/base/nonstd_unique_ptr.h" nit: Remove as well? https://codereview.chromium.org/1367033002/diff/110001/fpdfsdk/include/javascript/JS_Runtime.h#newcode15 fpdfsdk/include/javascript/JS_Runtime.h:15: #include ...
5 years, 2 months ago (2015-10-02 22:02:16 UTC) #6
Tom Sepez
https://codereview.chromium.org/1367033002/diff/110001/fpdfsdk/include/javascript/JS_Runtime.h File fpdfsdk/include/javascript/JS_Runtime.h (right): https://codereview.chromium.org/1367033002/diff/110001/fpdfsdk/include/javascript/JS_Runtime.h#newcode13 fpdfsdk/include/javascript/JS_Runtime.h:13: #include "../../../third_party/base/nonstd_unique_ptr.h" On 2015/10/02 22:02:15, Lei Zhang wrote: > ...
5 years, 2 months ago (2015-10-02 22:46:50 UTC) #7
Lei Zhang
Sounds good, lgtm
5 years, 2 months ago (2015-10-02 23:18:51 UTC) #8
Tom Sepez
5 years, 2 months ago (2015-10-02 23:43:20 UTC) #9
Message was sent while issue was closed.
Committed patchset #8 (id:130001) manually as
3dedace9623fef6161a8666e53a4ab2b9be61e4c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698