mozilla/addon-sdk — pull request #751 by Mossop (2013-01-30 23:39:40+00:00)
Title: Bug 836318: Items in submenus default to visible rather than using the PageContext

setVisibility is called recursively for the menu hierarchy so for the first call (for top-level items) we pass in the PageContext for the defaultVisibility, subsequent calls for submenus just use true for the defaultVisibility.