Why not just force the use of `searchData.size` and populate it if it's missing:

`searchData.size = Math.min( searchData.size|0, MAX_SEARCH_SIZE );`

What if it's negative?