Bug 1609068 Comment 15 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We need to replace the mGamepads vector with a hash table which stores gamepads as RefPtr.

I saw lots of used-as-freed errors when getting the callback of `ReportChangedCallback()`. It is because the item in mGamepads has been changed but the old object still registers `IOHIDDeviceRegisterInputReportCallback`. Using a hashtable also makes our code be easier to maintain.
We need to replace the mGamepads vector with a hash table which stores gamepads as RefPtr.

I saw lots of used-as-freed errors when getting the callback of `ReportChangedCallback()`. It is because the items in mGamepads has been changed but the old object still registers `IOHIDDeviceRegisterInputReportCallback`. Using a hashtable also makes our code be easier to maintain.
We need to replace the mGamepads vector with a hash table which stores gamepads as RefPtr.

I saw lots of used-as-freed errors when getting the callback of `ReportChangedCallback()`. It is because the items in mGamepads have been changed but the older objects still register `IOHIDDeviceRegisterInputReportCallback`. Using a hashtable also makes our code be easier to maintain.

Back to Bug 1609068 Comment 15