Bug 1588745 - part 4: Make TextControlState reuse its instance by itself r=Ehsan
Currently, only `HTMLInputElement` reuses `TextControlState` instance since `HTMLTextAreaElement` had the instance as a member rather than allocate it. Now, all instances are allocated in the heap independently for guaranteeing their lifetime. So, the reuse mechanism should be managed by `TextControlState` itself. Depends on D51393 Differential Revision: https://phabricator.services.mozilla.com/D51394
This commit is contained in:
@@ -846,8 +846,6 @@ class HTMLInputElement final : public nsGenericHTMLFormElementWithState,
|
||||
void UpdateEntries(
|
||||
const nsTArray<OwningFileOrDirectory>& aFilesOrDirectories);
|
||||
|
||||
static void Shutdown();
|
||||
|
||||
/**
|
||||
* Returns if the required attribute applies for the current type.
|
||||
*/
|
||||
@@ -1660,11 +1658,6 @@ class HTMLInputElement final : public nsGenericHTMLFormElementWithState,
|
||||
nsCOMPtr<nsIFilePicker> mFilePicker;
|
||||
RefPtr<HTMLInputElement> mInput;
|
||||
};
|
||||
|
||||
static void ReleaseTextControlState(TextControlState* aState);
|
||||
|
||||
static TextControlState* sCachedTextControlState;
|
||||
static bool sShutdown;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
||||
Reference in New Issue
Block a user