function appendExtension(menu, extension)
        {
            var subMenuId = extension.descriptor()["subMenuId"];
            if (subMenuId) {
                var subMenuItem = menu.appendSubMenuItem(extension.title(WebInspector.platform()));
                subMenuItem.appendItemsAtLocation(subMenuId);
            } else {
                menu.appendAction(extension.descriptor()["actionId"]);
            }
        }
@param {!WebInspector.ContextSubMenuItem} menu
@param {!Runtime.Extension} extension