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

Unified Diff: src/pdf/SkPDFGraphicState.h

Issue 12387086: Unwind PDFObject destructor calls into heap instead of stack. Notice: the order of the destructors … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFGraphicState.h
===================================================================
--- src/pdf/SkPDFGraphicState.h (revision 8010)
+++ src/pdf/SkPDFGraphicState.h (working copy)
@@ -63,7 +63,17 @@
* other references.
*/
static SkPDFGraphicState* GetNoSMaskGraphicState();
+
+protected:
+ virtual void transferPDFObjectsOwnership(SkTDArray<SkPDFObject*>* list) {
+ for (int i = 0 ; i < fResources.count(); ++i) {
+ list->push(fResources[i]);
+ }
+ fResources.remove(0, fResources.count());
+ SkPDFDict::transferPDFObjectsOwnership(list);
+ }
+
private:
const SkPaint fPaint;
SkTDArray<SkPDFObject*> fResources;
« no previous file with comments | « src/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698