Index: Source/WebCore/page/Geolocation.cpp |
=================================================================== |
--- Source/WebCore/page/Geolocation.cpp (revision 91141) |
+++ Source/WebCore/page/Geolocation.cpp (working copy) |
@@ -442,6 +442,9 @@ |
void Geolocation::setIsAllowed(bool allowed) |
{ |
+ // Protect the Geolocation object from garbage collection during a callback. |
+ RefPtr<Geolocation> protect(this); |
+ |
// This may be due to either a new position from the service, or a cached |
// position. |
m_allowGeolocation = allowed ? Yes : No; |