diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/geolocation/geolocation_error.h')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/geolocation/geolocation_error.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chromium/third_party/blink/renderer/modules/geolocation/geolocation_error.h b/chromium/third_party/blink/renderer/modules/geolocation/geolocation_error.h index 1601dfead1c..da1cfdff8c7 100644 --- a/chromium/third_party/blink/renderer/modules/geolocation/geolocation_error.h +++ b/chromium/third_party/blink/renderer/modules/geolocation/geolocation_error.h @@ -35,17 +35,18 @@ class GeolocationError : public GarbageCollectedFinalized<GeolocationError> { enum ErrorCode { kPermissionDenied, kPositionUnavailable }; static GeolocationError* Create(ErrorCode code, const String& message) { - return new GeolocationError(code, message); + return MakeGarbageCollected<GeolocationError>(code, message); } + + GeolocationError(ErrorCode code, const String& message) + : code_(code), message_(message) {} + void Trace(blink::Visitor* visitor) {} ErrorCode Code() const { return code_; } const String& Message() const { return message_; } private: - GeolocationError(ErrorCode code, const String& message) - : code_(code), message_(message) {} - ErrorCode code_; String message_; }; |