[Webkit-unassigned] [Bug 103259] Numeric identifiers of events are not guaranteed to be unique
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 29 17:08:31 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=103259
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #176838|review? |review-
Flag| |
--- Comment #9 from Darin Adler <darin at apple.com> 2012-11-29 17:10:48 PST ---
(From update of attachment 176838)
View in context: https://bugs.webkit.org/attachment.cgi?id=176838&action=review
review- because of the strange RefPtr local variable thing; otherwise looks OK
> Source/WebCore/Modules/geolocation/Geolocation.cpp:186
> + bool addSucceeded = m_idToNotifierMap.add(id, notifier.get()).isNewEntry;
> + if (addSucceeded)
> + m_notifierToIdMap.set(notifier.release(), id);
> + return addSucceeded;
I would write it this way:
if (!m_idToNotifierMap.add(id, notifier.get()).isNewEntry)
return false;
m_notifierToIdMap.set(notifier.release(), id);
return true;
> Source/WebCore/Modules/geolocation/Geolocation.cpp:321
> + RefPtr<GeoNotifier> passNotifier = notifier;
> + success = m_watchers.add(watchID, passNotifier.release());
This should just be:
success = m_watches.add(watchID, notifier);
There is no need for the passNotifier local variable.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list