 BrowserWindow = require 'browser-window'
 EventEmitter = require('events').EventEmitter
 MenuItem = require 'menu-item'
+v8Util = process.atomBinding 'v8_util'
 
 bindings = process.atomBinding 'menu'
 

      item.groupId = generateGroupId(@items, pos)
      @groupsMap[item.groupId] ?= []
      @groupsMap[item.groupId].push item
      @insertRadioItem pos, item.commandId, item.label, item.groupId

  @setSublabel pos, item.sublabel if item.sublabel?

        activeItem = @commandsMap[commandId]
        # Manually flip the checked flags when clicked.
        if activeItem?
          if activeItem.type in ['checkbox', 'radio']
            activeItem.checked = !activeItem.checked
          activeItem.click()

  switch item.type
