Changeset 72396 in webkit
- Timestamp:
- Nov 19, 2010 7:06:41 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r72395 r72396 1 2010-11-19 John Knottenbelt <jknotten@chromium.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Reentrant Geolocation tests crash with an assertion. 6 https://bugs.webkit.org/show_bug.cgi?id=39908 7 8 PositionErrors should not be sent to Geolocation watches or one 9 shots that are due to receive a valid cached position. Re-enable 10 fast/dom/Geolocation/maximum-age.html on Mac WebKit. 11 12 * platform/mac/Skipped: 13 1 14 2010-11-19 Anton Muhin <antonm@chromium.org> 2 15 -
trunk/LayoutTests/platform/mac/Skipped
r72210 r72396 182 182 http/tests/misc/prefetch-purpose.html 183 183 184 # https://bugs.webkit.org/show_bug.cgi?id=39908185 fast/dom/Geolocation/maximum-age.html186 187 184 # Filenames aren't filtered out from edit drags yet, see https://bugs.wekit.org/show_bug.cgi?id=38826 188 185 editing/pasteboard/file-drag-to-editable.html -
trunk/WebCore/ChangeLog
r72394 r72396 1 2010-11-19 John Knottenbelt <jknotten@chromium.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Reentrant Geolocation tests crash with an assertion. 6 https://bugs.webkit.org/show_bug.cgi?id=39908 7 8 PositionErrors should not be sent to Geolocation watches or one shots 9 that are due to receive a valid cached position. 10 11 Test: fast/dom/Geolocation/maximum-age.html 12 13 * page/Geolocation.cpp: 14 (WebCore::Geolocation::sendError): 15 (WebCore::Geolocation::copyCachedNotifiers): 16 (WebCore::Geolocation::handleError): 17 * page/Geolocation.h: 18 1 19 2010-11-19 Sam Magnuson <smagnuso@gmail.com> 2 20 -
trunk/WebCore/page/Geolocation.cpp
r72213 r72396 523 523 } 524 524 525 void Geolocation::extractNotifiersWithCachedPosition(GeoNotifierVector& notifiers, GeoNotifierVector* cached) 526 { 527 GeoNotifierVector nonCached; 528 GeoNotifierVector::iterator end = notifiers.end(); 529 for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) { 530 GeoNotifier* notifier = it->get(); 531 if (notifier->m_useCachedPosition) { 532 if (cached) 533 cached->append(notifier); 534 } else 535 nonCached.append(notifier); 536 } 537 notifiers.swap(nonCached); 538 } 539 540 void Geolocation::copyToSet(const GeoNotifierVector& src, GeoNotifierSet& dest) 541 { 542 GeoNotifierVector::const_iterator end = src.end(); 543 for (GeoNotifierVector::const_iterator it = src.begin(); it != end; ++it) { 544 GeoNotifier* notifier = it->get(); 545 dest.add(notifier); 546 } 547 } 548 525 549 void Geolocation::handleError(PositionError* error) 526 550 { … … 536 560 // added by calls to Geolocation methods from the callbacks, and to prevent 537 561 // further callbacks to these notifiers. 562 GeoNotifierVector oneShotsWithCachedPosition; 538 563 m_oneShots.clear(); 539 564 if (error->isFatal()) 540 565 m_watchers.clear(); 566 else { 567 // Don't send non-fatal errors to notifiers due to receive a cached position. 568 extractNotifiersWithCachedPosition(oneShotsCopy, &oneShotsWithCachedPosition); 569 extractNotifiersWithCachedPosition(watchersCopy, 0); 570 } 541 571 542 572 sendError(oneShotsCopy, error); 543 573 sendError(watchersCopy, error); 544 574 575 // hasListeners() doesn't distinguish between notifiers due to receive a 576 // cached position and those requiring a fresh position. Perform the check 577 // before restoring the notifiers below. 545 578 if (!hasListeners()) 546 579 stopUpdating(); 580 581 // Maintain a reference to the cached notifiers until their timer fires. 582 copyToSet(oneShotsWithCachedPosition, m_oneShots); 547 583 } 548 584 -
trunk/WebCore/page/Geolocation.h
r72213 r72396 134 134 void sendPosition(GeoNotifierVector&, Geoposition*); 135 135 136 static void extractNotifiersWithCachedPosition(GeoNotifierVector& notifiers, GeoNotifierVector* cached); 137 static void copyToSet(const GeoNotifierVector&, GeoNotifierSet&); 138 136 139 static void stopTimer(GeoNotifierVector&); 137 140 void stopTimersForOneShots();
Note: See TracChangeset
for help on using the changeset viewer.