Rework a loop in the native menu code to iterate over the vector of items we have, rather than the actual system menu.
Rework a loop in the native menu code to iterate over the vector of items we have, rather than the actual system menu.

I believe this may fix a crash where the code indexes out of bounds in the vector. The trouble is the assumption that the native menu index matches the index into the vector. If someone has installed a windows addon this may not be true. It's safer to restrict the iteration to the bounds of the vector and index into the menu based on that.

http://crbug.com/14600
TEST=none

Review URL: http://codereview.chromium.org/150061

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@19558 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser