Title: [288119] trunk/Source/WTF
- Revision
- 288119
- Author
- you...@apple.com
- Date
- 2022-01-18 10:11:46 -0800 (Tue, 18 Jan 2022)
Log Message
UUID decode routine should check for deleted value
https://bugs.webkit.org/show_bug.cgi?id=235315
Reviewed by Chris Dumez.
* wtf/UUID.h:
(WTF::UUID::decode):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (288118 => 288119)
--- trunk/Source/WTF/ChangeLog 2022-01-18 18:09:23 UTC (rev 288118)
+++ trunk/Source/WTF/ChangeLog 2022-01-18 18:11:46 UTC (rev 288119)
@@ -1,5 +1,15 @@
2022-01-18 Youenn Fablet <you...@apple.com>
+ UUID decode routine should check for deleted value
+ https://bugs.webkit.org/show_bug.cgi?id=235315
+
+ Reviewed by Chris Dumez.
+
+ * wtf/UUID.h:
+ (WTF::UUID::decode):
+
+2022-01-18 Youenn Fablet <you...@apple.com>
+
Make ServiceWorkerClient.id a UUID instead of a string derived from a ScriptExecutionContextIdentifier
https://bugs.webkit.org/show_bug.cgi?id=235070
<rdar://problem/87673540>
Modified: trunk/Source/WTF/wtf/UUID.h (288118 => 288119)
--- trunk/Source/WTF/wtf/UUID.h 2022-01-18 18:09:23 UTC (rev 288118)
+++ trunk/Source/WTF/wtf/UUID.h 2022-01-18 18:11:46 UTC (rev 288119)
@@ -123,7 +123,11 @@
if (!low)
return std::nullopt;
- return UUID { (static_cast<UInt128>(*high) << 64) | *low };
+ auto result = (static_cast<UInt128>(*high) << 64) | *low;
+ if (result == deletedValue)
+ return { };
+
+ return UUID { result };
}
// Creates a UUID that consists of 32 hexadecimal digits and returns its canonical form.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes