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

Issue 1338993005: Get CJS_RuntimeFactory out of the CJS_GlobalData management business. (Closed)

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

Description

Get CJS_RuntimeFactory out of the CJS_GlobalData management business. First part of getting rid of CJS_RuntimeFactory. The factory design pattern isn't appropriate here since we only ever make one kind of object. CJS_GlobalData is now perfectly capable of managing itself through internal ref counts. I'm philosophically opposed to keeping ref-counts outside the object (do you hear me std::shared_ptr, you're bad!) R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/9a817f092e6800e9338b41acf4ea0416b6ad4467

Patch Set 1 #

Total comments: 3

Patch Set 2 : Remove now unused members. #

Patch Set 3 : Use pre-increment operator. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -54 lines) Patch
M fpdfsdk/include/javascript/IJavaScript.h View 1 2 chunks +5 lines, -12 lines 0 comments Download
M fpdfsdk/include/javascript/JS_GlobalData.h View 3 chunks +8 lines, -3 lines 0 comments Download
M fpdfsdk/src/javascript/JS_GlobalData.cpp View 1 2 2 chunks +22 lines, -17 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Runtime.cpp View 2 chunks +0 lines, -20 lines 0 comments Download
M fpdfsdk/src/javascript/global.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Tom Sepez
Lei, for review. These APIs are still too wacky to write clean tests for ...
5 years, 3 months ago (2015-09-14 19:19:07 UTC) #2
Lei Zhang
lgtm https://codereview.chromium.org/1338993005/diff/1/fpdfsdk/include/javascript/JS_GlobalData.h File fpdfsdk/include/javascript/JS_GlobalData.h (right): https://codereview.chromium.org/1338993005/diff/1/fpdfsdk/include/javascript/JS_GlobalData.h#newcode82 fpdfsdk/include/javascript/JS_GlobalData.h:82: CJS_GlobalData(CPDFDoc_Environment* pApp); explicit https://codereview.chromium.org/1338993005/diff/1/fpdfsdk/src/javascript/JS_GlobalData.cpp File fpdfsdk/src/javascript/JS_GlobalData.cpp (right): https://codereview.chromium.org/1338993005/diff/1/fpdfsdk/src/javascript/JS_GlobalData.cpp#newcode109 ...
5 years, 3 months ago (2015-09-14 20:53:28 UTC) #3
Tom Sepez
https://codereview.chromium.org/1338993005/diff/1/fpdfsdk/src/javascript/JS_GlobalData.cpp File fpdfsdk/src/javascript/JS_GlobalData.cpp (right): https://codereview.chromium.org/1338993005/diff/1/fpdfsdk/src/javascript/JS_GlobalData.cpp#newcode109 fpdfsdk/src/javascript/JS_GlobalData.cpp:109: g_Instance->m_RefCount += 1; On 2015/09/14 20:53:28, Lei Zhang wrote: ...
5 years, 3 months ago (2015-09-14 21:31:24 UTC) #4
Tom Sepez
5 years, 3 months ago (2015-09-14 21:32:38 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
9a817f092e6800e9338b41acf4ea0416b6ad4467 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698