Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b154792a authored by Ady Abraham's avatar Ady Abraham
Browse files

HWUI: mSerialContext needs to outlive other serializing members

mSerialContext is used as the serialization context, and need to
outlive mOpenMultiPicStream and mMultiPic and those are referencing
it in SkSharingSerialContext SkSharingSerialContext::serializeImage

Test: https://buganizer.corp.google.com/issues/182710292#comment16
Bug: 183049238
Change-Id: I25842e492d5efd7a7532964bddca61559d50ebe1
parent 38e5def5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -137,9 +137,10 @@ private:
    int mCaptureSequence = 0;

    // Multi frame serialization stream and writer used when serializing more than one frame.
    std::unique_ptr<SkSharingSerialContext> mSerialContext;  // Must be declared before any other
                                                             // serializing member
    std::unique_ptr<SkFILEWStream> mOpenMultiPicStream;
    sk_sp<SkDocument> mMultiPic;
    std::unique_ptr<SkSharingSerialContext> mSerialContext;

    /**
     * mRecorder holds the current picture recorder when serializing in either SingleFrameSKP or