[Mac] Don't crash when selecting closed window from Dock menu.
[Mac] Don't crash when selecting closed window from Dock menu.

The Dock menu contains an automagic section where you can select
amongst open windows.  This is wired up to send to the window as a
target, but if JavaScript closes the window in the meanwhile, it
messages a freed object.  This short-circuits the specific selector if
the window is no longer valid.

http://crbug.com/14003
TEST=Bug contains instructions and an example html file to help.

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

git-svn-id: http://src.chromium.org/svn/trunk/src@27769 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 8174401b36ce43e934007c8c60533ba0fa6d5147
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser