/** * reads the current addon configuration from a serializer object. * * @author FloSoft */ void GlobalGameSettings::Deserialize(Serializer *ser) { game_speed = static_cast<GameSpeed>(ser->PopUnsignedChar()); game_objective = static_cast<GameObjective>(ser->PopUnsignedChar()); start_wares = static_cast<StartWares>(ser->PopUnsignedChar()); lock_teams = ser->PopBool(); exploration = static_cast<Exploration>(ser->PopUnsignedChar()); team_view = ser->PopBool(); random_location = ser->PopBool(); unsigned int count = ser->PopUnsignedInt(); reset(); LOG.write("<<< Addon Status:\n"); for(unsigned int i = 0; i < count; ++i) { AddonId addon = AddonId(ser->PopUnsignedInt()); unsigned int status = ser->PopUnsignedInt(); setSelection(addon, status); LOG.write("\t%d=%d\n", addon, status); } }
void nsPerformanceGroup::Dispose() { if (!mService) { // We have already called `Dispose()`. return; } // Remove any reference to the service RefPtr<nsPerformanceStatsService> service; service.swap(mService); service->mGroups.RemoveEntry(this); if (mScope == GroupScope::ADDON) { MOZ_ASSERT(IsAddon()); service->mAddonIdToGroup.RemoveEntry(AddonId()); } else if (mScope == GroupScope::WINDOW) { MOZ_ASSERT(IsWindow()); service->mWindowIdToGroup.RemoveEntry(WindowId()); } }
/* readonly attribute AString addonId; */ NS_IMETHODIMP nsPerformanceGroupDetails::GetAddonId(nsAString& aAddonId) { aAddonId.Assign(AddonId()); return NS_OK; };