| 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 0052c3185ccaccd8156342f43f603e053a8907d5..35d63dbf29e3a9acd9a38ae628a4df31c4581ce0 100644
|
| --- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
|
| +++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "modules/geolocation/GeolocationError.h"
|
| #include "platform/UserGestureIndicator.h"
|
| #include "platform/mojo/MojoHelper.h"
|
| +#include "public/platform/Platform.h"
|
| #include "public/platform/ServiceRegistry.h"
|
| #include "wtf/Assertions.h"
|
| #include "wtf/CurrentTime.h"
|
| @@ -526,6 +527,13 @@ void Geolocation::pageVisibilityChanged()
|
|
|
| void Geolocation::onGeolocationConnectionError()
|
| {
|
| + // If a request is outstanding at process shutdown, this error handler will
|
| + // be called. In that case, blink has already shut down so do nothing.
|
| + //
|
| + // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
|
| + if (!Platform::current())
|
| + return;
|
| +
|
| PositionError* error = PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage);
|
| error->setIsFatal(true);
|
| handleError(error);
|
| @@ -533,6 +541,13 @@ void Geolocation::onGeolocationConnectionError()
|
|
|
| void Geolocation::onPermissionConnectionError()
|
| {
|
| + // If a request is outstanding at process shutdown, this error handler will
|
| + // be called. In that case, blink has already shut down so do nothing.
|
| + //
|
| + // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
|
| + if (!Platform::current())
|
| + return;
|
| +
|
| onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
|
| }
|
|
|
|
|