diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index acb74726c4272..350b4c036c2f9 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2015-01-01 Chris Dumez + + ASSERT that a null key is never used with FeatureCounter + https://bugs.webkit.org/show_bug.cgi?id=140030 + + Reviewed by Darin Adler. + + * platform/FeatureCounter.cpp: + (WebCore::FeatureCounter::incrementKey): + (WebCore::FeatureCounter::setKey): + * platform/ios/FeatureCounter.mm: + (WebCore::FeatureCounter::incrementKey): + (WebCore::FeatureCounter::setKey): + 2015-01-01 Chris Dumez [iOS] Fix memory leak in FeatureCounter diff --git a/Source/WebCore/platform/FeatureCounter.cpp b/Source/WebCore/platform/FeatureCounter.cpp index 8c37d2835bd9f..212d06d4e7786 100644 --- a/Source/WebCore/platform/FeatureCounter.cpp +++ b/Source/WebCore/platform/FeatureCounter.cpp @@ -52,13 +52,13 @@ bool FeatureCounter::shouldUseForPage(Page* page) void FeatureCounter::incrementKey(Page* page, const char* const key) { UNUSED_PARAM(page); - UNUSED_PARAM(key); + ASSERT_UNUSED(key, key); } void FeatureCounter::setKey(Page* page, const char* const key, int64_t value) { UNUSED_PARAM(page); - UNUSED_PARAM(key); + ASSERT_UNUSED(key, key); UNUSED_PARAM(value); } diff --git a/Source/WebCore/platform/ios/FeatureCounter.mm b/Source/WebCore/platform/ios/FeatureCounter.mm index 7b269d2435419..3d61f3485747b 100644 --- a/Source/WebCore/platform/ios/FeatureCounter.mm +++ b/Source/WebCore/platform/ios/FeatureCounter.mm @@ -34,6 +34,7 @@ void FeatureCounter::incrementKey(Page* page, const char* const key) { + ASSERT(key); if (!shouldUseForPage(page)) return; @@ -43,6 +44,7 @@ void FeatureCounter::setKey(Page* page, const char* const key, int64_t value) { + ASSERT(key); if (!shouldUseForPage(page)) return;