Bug 1368250 - Give the TextControlInitializer property a dtor to automatically call Revoke when the property is deleted. r=mats

This commit is contained in:
Jonathan Kew
2017-05-28 11:22:29 +01:00
parent 8041f82d00
commit 3f425bcdc3
2 changed files with 11 additions and 14 deletions

View File

@@ -222,9 +222,14 @@ protected:
friend class nsTextEditorState; // needs access to UpdateValueDisplay
// Temp reference to scriptrunner
// We could make these auto-Revoking via the "delete" entry for safety
NS_DECLARE_FRAME_PROPERTY_WITHOUT_DTOR(TextControlInitializer,
EditorInitializer)
NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(TextControlInitializer,
EditorInitializer,
nsTextControlFrame::RevokeInitializer)
static void
RevokeInitializer(EditorInitializer* aInitializer) {
aInitializer->Revoke();
};
class EditorInitializer : public mozilla::Runnable {
public: