When removing the currently selected tab, temporarily unset the current BWebView,
since we did not delete the BWebView directly, but in the application thread, this was a race condition that would only crash sometimes (in _TabChanged(), when we tried to attach user data to the current tab before switching it). This should fix the last known (to me) crash. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@452 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
committed by
Alexandre Deckner
parent
25057e59b7
commit
fa485bda23
@@ -694,7 +694,7 @@ BrowserWindow::QuitRequested()
|
|||||||
// Do this here, so WebKit tear down happens earlier.
|
// Do this here, so WebKit tear down happens earlier.
|
||||||
while (fTabManager->CountTabs() > 0)
|
while (fTabManager->CountTabs() > 0)
|
||||||
_ShutdownTab(0);
|
_ShutdownTab(0);
|
||||||
SetCurrentWebView(0);
|
SetCurrentWebView(NULL);
|
||||||
|
|
||||||
BMessage message(WINDOW_CLOSED);
|
BMessage message(WINDOW_CLOSED);
|
||||||
message.AddRect("window frame", Frame());
|
message.AddRect("window frame", Frame());
|
||||||
@@ -1056,6 +1056,8 @@ BrowserWindow::_ShutdownTab(int32 index)
|
|||||||
{
|
{
|
||||||
BView* view = fTabManager->RemoveTab(index);
|
BView* view = fTabManager->RemoveTab(index);
|
||||||
BWebView* webView = dynamic_cast<BWebView*>(view);
|
BWebView* webView = dynamic_cast<BWebView*>(view);
|
||||||
|
if (webView == CurrentWebView())
|
||||||
|
SetCurrentWebView(NULL);
|
||||||
if (webView != NULL)
|
if (webView != NULL)
|
||||||
webView->Shutdown();
|
webView->Shutdown();
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user