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

Issue 1351173002: XFA: contention between FXJSE and FXJS over isolate data slots (Closed)

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

Description

XFA: contention between FXJSE and FXJS over isolate data slots This probably broke at 06b60021e when the FXJS slot moved to 0 from 1 unless explicitly overriden by the embedder, which conflicted with the FXJSE_ usage of slot 0. Also simplify some logic used to track global intialization of the underling JS. TEST=run_javascript_tests.py on XFA branch doesn't segv. R=jochen@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/ed7b2b50aa1744e0bc5a60bef12c61fa91d863b7

Patch Set 1 #

Total comments: 1

Patch Set 2 : re-upload #

Patch Set 3 : Use single slot with new perisolate class. #

Patch Set 4 : remove stray include #

Patch Set 5 : rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -146 lines) Patch
M fpdfsdk/include/fpdfxfa/fpdfxfa_app.h View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M fpdfsdk/include/javascript/JS_Define.h View 1 2 7 chunks +14 lines, -14 lines 0 comments Download
M fpdfsdk/include/jsapi/fxjs_v8.h View 1 2 3 3 chunks +24 lines, -5 lines 0 comments Download
M fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp View 1 2 3 4 3 chunks +1 line, -17 lines 0 comments Download
M fpdfsdk/src/fsdk_mgr.cpp View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Runtime.cpp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8.cpp View 1 2 19 chunks +80 lines, -85 lines 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M xfa/src/fxjse/src/runtime.cpp View 1 2 4 chunks +8 lines, -15 lines 2 comments Download

Messages

Total messages: 11 (2 generated)
Tom Sepez
Lei, Jochen, for review. A temporary fix until we sort this out. https://codereview.chromium.org/1351173002/diff/1/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp File fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp ...
5 years, 3 months ago (2015-09-17 21:58:39 UTC) #2
Lei Zhang
I defer to jochen.
5 years, 3 months ago (2015-09-17 22:42:15 UTC) #3
jochen (gone - plz use gerrit)
it would be preferable to introduce a new struct PerIsolateData that held all pointers required ...
5 years, 3 months ago (2015-09-18 08:31:57 UTC) #4
Tom Sepez
Ok, added FXJS_PerIsolateData class.
5 years, 3 months ago (2015-09-21 21:28:36 UTC) #5
jochen (gone - plz use gerrit)
lgtm
5 years, 3 months ago (2015-09-22 15:13:56 UTC) #6
Tom Sepez
Committed patchset #5 (id:80001) manually as ed7b2b50aa1744e0bc5a60bef12c61fa91d863b7 (presubmit successful).
5 years, 3 months ago (2015-09-22 15:36:22 UTC) #7
jun_fang
Hi Tom, Please take a look at my comment. Thanks! https://codereview.chromium.org/1351173002/diff/80001/xfa/src/fxjse/src/runtime.cpp File xfa/src/fxjse/src/runtime.cpp (left): https://codereview.chromium.org/1351173002/diff/80001/xfa/src/fxjse/src/runtime.cpp#oldcode91 ...
5 years, 1 month ago (2015-10-28 16:19:26 UTC) #9
Tom Sepez
https://codereview.chromium.org/1351173002/diff/80001/xfa/src/fxjse/src/runtime.cpp File xfa/src/fxjse/src/runtime.cpp (left): https://codereview.chromium.org/1351173002/diff/80001/xfa/src/fxjse/src/runtime.cpp#oldcode91 xfa/src/fxjse/src/runtime.cpp:91: if (!pRuntimeData) { On 2015/10/28 16:19:26, jun_fang wrote: > ...
5 years, 1 month ago (2015-10-28 16:55:29 UTC) #10
jun_fang
5 years, 1 month ago (2015-10-30 12:41:23 UTC) #11
Message was sent while issue was closed.
On 2015/10/28 16:55:29, Tom Sepez wrote:
>
https://codereview.chromium.org/1351173002/diff/80001/xfa/src/fxjse/src/runti...
> File xfa/src/fxjse/src/runtime.cpp (left):
> 
>
https://codereview.chromium.org/1351173002/diff/80001/xfa/src/fxjse/src/runti...
> xfa/src/fxjse/src/runtime.cpp:91: if (!pRuntimeData) {
> On 2015/10/28 16:19:26, jun_fang wrote:
> > When pRuntimeData is nullptr, it calls CFXJSE_RuntimeData::Create to create
a
> > new one. In the right side, we didn't check whether pData is nullptr. In
fact,
> > we found that it could be nullptr when we investigate one issue reported by
> > Foxit QA. If pData is nullptr, it causes a crashier.  
> 
> Ok, please file a bug for this in the issue tracker.

Hi Tom,

Our QA raised an issue in
https://bugs.chromium.org/p/pdfium/issues/detail?id=259.
Currently, XFA testing is blocked by this issue. Can you help to check it ASAP?
Thanks!

Powered by Google App Engine
This is Rietveld 408576698