REGRESSION (r208672): Crash in com.apple.WebCore: WebCore::DatabaseContext::stopDatabases + 34
https://bugs.webkit.org/show_bug.cgi?id=164820

Reviewed by Sam Weinig.

Crash seen in existing regression tests; reliably reproducible in some test configurations.

* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::contextDestroyed): Call through to base class before calling
stopDatabases, since that might cause this object to be deallocated.
(WebCore::DatabaseContext::stopDatabases): Be sure not to clear the possibly-last reference
to this database context until after all code that accesses data members, since it might
cause this object to be deallocated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@208803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed