Title: [264677] trunk/Source/WebKit
Revision
264677
Author
ddkil...@apple.com
Date
2020-07-21 14:07:40 -0700 (Tue, 21 Jul 2020)

Log Message

WebKit::ColorSpaceData::decode() does not need default: case
<https://webkit.org/b/214587>
<rdar://problem/65777868>

Reviewed by Darin Adler.

* Shared/mac/ColorSpaceData.mm:
(WebKit::ColorSpaceData::decode):
- Remove default: case and add ASSERT_NOT_REACHED() and
  move `return false;` to bottom of the method.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (264676 => 264677)


--- trunk/Source/WebKit/ChangeLog	2020-07-21 21:05:59 UTC (rev 264676)
+++ trunk/Source/WebKit/ChangeLog	2020-07-21 21:07:40 UTC (rev 264677)
@@ -1,3 +1,16 @@
+2020-07-21  David Kilzer  <ddkil...@apple.com>
+
+        WebKit::ColorSpaceData::decode() does not need default: case
+        <https://webkit.org/b/214587>
+        <rdar://problem/65777868>
+
+        Reviewed by Darin Adler.
+
+        * Shared/mac/ColorSpaceData.mm:
+        (WebKit::ColorSpaceData::decode):
+        - Remove default: case and add ASSERT_NOT_REACHED() and
+          move `return false;` to bottom of the method.
+
 2020-07-21  James Savage  <james.sav...@apple.com>
 
         Unable to call WKScriptMessageHandlerWithReply's replyHandler with a nil errorMessage in Swift

Modified: trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm (264676 => 264677)


--- trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm	2020-07-21 21:05:59 UTC (rev 264676)
+++ trunk/Source/WebKit/Shared/mac/ColorSpaceData.mm	2020-07-21 21:07:40 UTC (rev 264677)
@@ -87,10 +87,10 @@
         colorSpaceData.cgColorSpace = adoptCF(CGColorSpaceCreateWithICCData(data.get()));
         return true;
     }
+    }
 
-    default:
-        return false;
-    }
+    ASSERT_NOT_REACHED();
+    return false;
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to