Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: Source/WebCore/page/Geolocation.cpp

Issue 7398018: Merge 90914 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/page/Geolocation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/WebCore/page/Geolocation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698