[webkit-reviews] review granted: [Bug 178148] Modernize Geolocation code : [Attachment 323383] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 10 22:23:09 PDT 2017
Ryosuke Niwa <rniwa at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 178148: Modernize Geolocation code
https://bugs.webkit.org/show_bug.cgi?id=178148
Attachment 323383: Patch
https://bugs.webkit.org/attachment.cgi?id=323383&action=review
--- Comment #9 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 323383
--> https://bugs.webkit.org/attachment.cgi?id=323383
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=323383&action=review
r=me
> Source/WebCore/Modules/geolocation/Coordinates.h:48
> + double latitude() const { return m_position.latitude; }
> + double longitude() const { return m_position.longitude; }
We should probably assert that these values aren't NaN/-1.
> Source/WebCore/Modules/geolocation/GeolocationPosition.h:56
> + double latitude { -1 };
it's worth mentioning that these values are mandatory and cannot be omitted.
We should also add asserts where it's used to make sure we never see -1.
Also, we should probably use NaN instead of -1 per IRC discussion
since latitude & longitude can take a negative value.
More information about the webkit-reviews
mailing list