summaryrefslogtreecommitdiff
path: root/fxjs/JS_Define.h
AgeCommit message (Collapse)Author
2018-02-09Rename fxjs_v8.{h,cpp} to cfxjs_engine.{h,cpp}Tom Sepez
Place the template map definitions entirely in .cpp file. Change-Id: I2643f1b99f5582b69aa985857c4aa6f9b5ab57c8 Reviewed-on: https://pdfium-review.googlesource.com/26150 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-08Make CFXJS_Engine::SetObjectPrivate() static.Tom Sepez
Avoids call to CFXJS_Engine::EngineFromIsolateCurrentContext() during the Dispose() path, which feels scary because there aren't guarantees about it having an engine at isolate "dispose" time. Fortunately, |this| is not used, so make that fact clear. Replace some c-style callbacks with std::function while we're at it. Change-Id: Ia1a1a1fcc085d8657939e6f8c8d34fc511afddfe Reviewed-on: https://pdfium-review.googlesource.com/25970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-05Fold CJS_EmbedObj classes into CJS_Object classesDan Sinclair
This CL removes the CJS_EmbedObj class and various subclasses and folds the subclasses into their CJS_Object counterparts. Change-Id: If6b882a4995c0b1bf83ac783f5c27ba9216c2d5c Reviewed-on: https://pdfium-review.googlesource.com/25410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-02-05Remove the CJS_EmbedObj template param from JSConstructor.Dan Sinclair
Each of the CJS_Objects can create their CJS_EmbedObj's internally and we don't need to do it though the JSConstructor. This also removes the need for the SetEmbedObj method in CJS_Object. Change-Id: Ib0535ad922b370634fd1e622a04860a96c4f2825 Reviewed-on: https://pdfium-review.googlesource.com/25370 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-02-05Use unique pointer in CFXJS_PerObjectData.Tom Sepez
Also use the actual type information, not void* and remove casts. Template function not required to wrap virtual dtors. Change-Id: I9397cae136c3c395a368a1ef0ce8162d9b586076 Reviewed-on: https://pdfium-review.googlesource.com/25290 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-01Introduce CXFJS_Engine::EngineFromContext/SetEngineInContext helpersTom Sepez
No functional change, but expose helpers likely to be needed by next steps. Rename CXFJS_Engine::CurrentEngineFromIsolate to be more accurately named along the way. Change-Id: Iaf2d15a09cfed85705d24ee056e78edf0660ce59 Reviewed-on: https://pdfium-review.googlesource.com/25090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-01-30Remove bare new from JS_Define.hTom Sepez
Change-Id: Ic734c7141e52b8ca332ca9dc78118b84904c41b0 Reviewed-on: https://pdfium-review.googlesource.com/24470 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-10-30Move fpdfsdk/javascript to fxjs/Dan Sinclair
This CL moves all of the CJS files into fxjs. The :javascript build rule is removed and :fxjs is used instead. Change-Id: I1701b308f51317d0346c7401b43812c3f43a27bf Reviewed-on: https://pdfium-review.googlesource.com/17047 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>