Scenario. - localStorage already has other data in it. - Plug-in tries to store json, but it is too big. - cleanUpLocalStorage has a go at cleaning up but finds nothing to do (the data already in localStorage has nothing to do with the plug-in) - Loops around and tries again. Still too big (obviously). Loops around and tries again......and so on. Result: Infinite loop.