Fix crash when deleting ReadingListStore via ReadingListModelStorage*.
ReadingListStore inherits from multiple classes, including from ReadingListModelStorage that does not define a virtual destructor. Since ReadingListModelImpl has a scoped_ptr to ReadingListModelStorage, it calls the base destructor with a pointer that does not correspond to memory returned by "new" (it points to somewhere inside the memory block). The issue can be fixed by defining a virtual destructor on the base class ReadingListModelStorage (as all class with virtual method should do). Also mark the class a non-copyable since copying would cause slicing. BUG=673169 Review-Url: https://codereview.chromium.org/2563303002 Cr-Commit-Position: refs/heads/master@{#437800}
Showing
Please register or sign in to comment