Fix handling of tab contents disappearing out from underneath Javascript dialogs.

BUG=93094, 90196
TEST=as in bug 93094

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97023 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 3f416e4..846fc93 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -823,6 +823,10 @@
   // once.
   bool notify_disconnection_;
 
+  // Pointer to the JavaScript dialog creator, lazily assigned. Used because the
+  // delegate of this TabContents is nulled before its destructor is called.
+  content::JavaScriptDialogCreator* dialog_creator_;
+
 #if defined(OS_WIN)
   // Handle to an event that's set when the page is showing a message box (or
   // equivalent constrained window).  Plugin processes check this to know if