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

Issue 12387086: Unwind PDFObject destructor calls into heap instead of stack. Notice: the order of the destructors … (Closed)

Created:
7 years, 9 months ago by edisonn
Modified:
7 years, 1 month ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Unwind PDFObject destructor calls into heap instead of stack. Notice: the order of the destructors called is not preserved, but by using refcounting we were not in control anyway. This change does not unwind all classes that inherit PDFObject, but only the ones that we absolutely must in order to avoid stack overflow during normal executions. If the issue appears again we can make this change in other classes too.

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -4 lines) Patch
M src/pdf/SkPDFDevice.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M src/pdf/SkPDFFormXObject.cpp View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M src/pdf/SkPDFGraphicState.h View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M src/pdf/SkPDFStream.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M src/pdf/SkPDFTypes.h View 1 2 3 4 5 5 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
edisonn
7 years, 9 months ago (2013-03-04 15:44:27 UTC) #1
edisonn
On 2013/03/04 15:44:27, edisonn wrote: ping
7 years, 9 months ago (2013-03-05 18:38:39 UTC) #2
vandebo (ex-Chrome)
On 2013/03/05 18:38:39, edisonn wrote: > On 2013/03/04 15:44:27, edisonn wrote: > > ping Sorry, ...
7 years, 9 months ago (2013-03-05 18:50:38 UTC) #3
reed1
https://codereview.chromium.org/12387086/diff/5002/include/core/SkRefCnt.h File include/core/SkRefCnt.h (right): https://codereview.chromium.org/12387086/diff/5002/include/core/SkRefCnt.h#newcode110 include/core/SkRefCnt.h:110: friend class SkPDFObject; ick. If we must do this, ...
7 years, 9 months ago (2013-03-05 18:51:21 UTC) #4
Tom Hudson
https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFGraphicState.h File src/pdf/SkPDFGraphicState.h (right): https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFGraphicState.h#newcode68 src/pdf/SkPDFGraphicState.h:68: virtual void trasferPDFObjecsOwnership(SkTDArray<SkPDFObject*>* list) { Spelling errors: transfer, Objects ...
7 years, 9 months ago (2013-03-07 13:54:37 UTC) #5
edisonn
7 years, 9 months ago (2013-03-07 16:51:30 UTC) #6
https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFGraphicState.h
File src/pdf/SkPDFGraphicState.h (right):

https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFGraphicState...
src/pdf/SkPDFGraphicState.h:68: virtual void
trasferPDFObjecsOwnership(SkTDArray<SkPDFObject*>* list) {
On 2013/03/07 13:54:37, Tom Hudson wrote:
> Spelling errors: transfer, Objects

Done.

https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFTypes.h
File src/pdf/SkPDFTypes.h (right):

https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFTypes.h#newc...
src/pdf/SkPDFTypes.h:84: /** Destroys safely an array of SkPDFObject's.
On 2013/03/07 13:54:37, Tom Hudson wrote:
> nit: no apostrophe

Done.

https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFTypes.h#newc...
src/pdf/SkPDFTypes.h:86: *  @param list: The list of objects to be destroyed.
On 2013/03/07 13:54:37, Tom Hudson wrote:
> nit: redundant @param
removed

https://codereview.chromium.org/12387086/diff/15001/src/pdf/SkPDFTypes.h#newc...
src/pdf/SkPDFTypes.h:118: *  @param list: The list that will own the SkPDFObject
members.
On 2013/03/07 13:54:37, Tom Hudson wrote:
> This @param declaration doesn't actually explain what's going on (perhaps
> because of verb tense?), but we don't normally require @param for everything,
> and it is adequately covered by the function comment.

Done.

Powered by Google App Engine
This is Rietveld 408576698