RESOLVED FIXED 122495
[Mac] WebNetscapePluginView should no longer use deleteAllValues
https://bugs.webkit.org/show_bug.cgi?id=122495
Summary [Mac] WebNetscapePluginView should no longer use deleteAllValues
Darin Adler
Reported 2013-10-08 00:05:23 PDT
WebNetscapePluginView should no longer use deleteAllValues
Attachments
Patch (4.96 KB, patch)
2013-10-08 00:08 PDT, Darin Adler
no flags
Patch (5.41 KB, patch)
2013-10-08 01:03 PDT, Darin Adler
andersca: review+
andersca: commit-queue-
Darin Adler
Comment 1 2013-10-08 00:08:09 PDT
Andreas Kling
Comment 2 2013-10-08 00:11:38 PDT
Comment on attachment 213666 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213666&action=review Too tired to parse this code but here's a comment: > Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:710 > + for (auto it = timers->begin(), end = timers->end(); it != end; ++it) You can use range-based for in WebKit/mac. > Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:725 > + for (auto it = timers->begin(), end = timers->end(); it != end; ++it) { Same here.
Darin Adler
Comment 3 2013-10-08 01:03:29 PDT
Anders Carlsson
Comment 4 2013-10-08 07:29:30 PDT
Comment on attachment 213673 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213673&action=review > Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:711 > + for (auto& it: *timers) > + it.value->stop(); Can use timers->values() here to avoid it.value. > Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:725 > + for (auto& it: *timers) { Same thing here. > Source/WebKit/mac/Plugins/WebNetscapePluginView.mm:2165 > + while (timerID == 0 || HashTraits<uint32>::isDeletedValue(timerID) || *(slot = &timers->add(timerID, nullptr).iterator->value)); I think we have HashSet::isGoodValue that you can use here.
Darin Adler
Comment 5 2013-10-08 09:30:05 PDT
Note You need to log in before you can comment on or make changes to this bug.