WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176496
Modernize Geolocation code
https://bugs.webkit.org/show_bug.cgi?id=176496
Summary
Modernize Geolocation code
Alex Christensen
Reported
2017-09-07 00:00:19 PDT
Modernize Geolocation code
Attachments
Patch
(59.13 KB, patch)
2017-09-07 00:02 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(61.75 KB, patch)
2017-09-07 00:17 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(66.79 KB, patch)
2017-09-07 01:15 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(67.13 KB, patch)
2017-09-07 10:45 PDT
,
Alex Christensen
aestes
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2017-09-07 00:02:16 PDT
Created
attachment 320098
[details]
Patch
Alex Christensen
Comment 2
2017-09-07 00:17:04 PDT
Created
attachment 320099
[details]
Patch
Alex Christensen
Comment 3
2017-09-07 01:15:17 PDT
Created
attachment 320102
[details]
Patch
Sam Weinig
Comment 4
2017-09-07 09:44:10 PDT
Comment on
attachment 320102
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=320102&action=review
> Source/WebCore/Modules/geolocation/GeolocationController.cpp:-114 > - copyToVector(m_observers, observersVector);
Seems like we should have an overload of copyToVector that looks like: template<typename T, typename U, typename V> inline Vector<T> copyToVector(const HashSet<T, U, V>& collection) { Vector<T> result; result.reserveInitialCapacity(collection.size()); for (auto& value : collection) result.uncheckedAppend(WTFCopy(value)); } Where WTFCopy is a new function that usually just assigns, but is overloaded for Ref<> to call copyRef(). Maybe a big enough bit of infrastructure that you don't want to do it here.
> Source/WebKit/ChangeLog:10 > + * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp: > + (WebKit::LegacyCustomProtocolManager::LegacyCustomProtocolManager): > + (WebKit::LegacyCustomProtocolManager::startLoading):
ChangeLog could use some additional information. Much of this looks un-Geolocation related.
Sam Weinig
Comment 5
2017-09-07 09:46:36 PDT
The biggest cleanup / improvement in this code that you could do would be to find a way to ensure that GeoNotifier::runSuccessCallback() always took a reference. Largely this revolves around figuring out what to do with Geolocation::lastPosition().
Alex Christensen
Comment 6
2017-09-07 10:45:58 PDT
Created
attachment 320134
[details]
Patch
Alex Christensen
Comment 7
2017-09-07 10:53:44 PDT
I'm trying to make this have no change in behavior and that would be a change. We can also do the vector cleanup later.
Alex Christensen
Comment 8
2017-09-07 12:02:02 PDT
http://trac.webkit.org/r221743
Radar WebKit Bug Importer
Comment 9
2017-09-27 12:38:28 PDT
<
rdar://problem/34693666
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug