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

Unified Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert "unretained" part and "disallow pointers" part Created 4 years, 6 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
Index: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index e6e48acb49603b7a781636bea81e181b75ce3604..b5ce7085d1f609d992e01504407cdff4343e29a6 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -428,7 +428,7 @@ void Geolocation::requestPermission()
m_permissionService->RequestPermission(
mojom::blink::PermissionName::GEOLOCATION,
getExecutionContext()->getSecurityOrigin()->toString(),
- createBaseCallback(bind<mojom::blink::PermissionStatus>(&Geolocation::onGeolocationPermissionUpdated, this)));
+ createBaseCallback(bind<mojom::blink::PermissionStatus>(&Geolocation::onGeolocationPermissionUpdated, wrapCrossThreadPersistent(this))));
}
void Geolocation::makeSuccessCallbacks()
@@ -501,7 +501,7 @@ void Geolocation::updateGeolocationServiceConnection()
void Geolocation::queryNextPosition()
{
- m_geolocationService->QueryNextPosition(createBaseCallback(bind<mojom::blink::GeopositionPtr>(&Geolocation::onPositionUpdated, this)));
+ m_geolocationService->QueryNextPosition(createBaseCallback(bind<mojom::blink::GeopositionPtr>(&Geolocation::onPositionUpdated, wrapCrossThreadPersistent(this))));
}
void Geolocation::onPositionUpdated(mojom::blink::GeopositionPtr position)

Powered by Google App Engine
This is Rietveld 408576698