Title: [270520] trunk/Source/WebKit
Revision
270520
Author
wenson_hs...@apple.com
Date
2020-12-07 13:12:36 -0800 (Mon, 07 Dec 2020)

Log Message

Ensure that DisplayListSharedMemoryHeader is never explicitly created or destroyed at compile-time
https://bugs.webkit.org/show_bug.cgi?id=219609

Reviewed by Tim Horton.

Make sure that a `DisplayListSharedMemoryHeader` is never created or destroyed by marking the constructor and
destructor as deleted. A `DisplayListSharedMemoryHeader` should only ever be `reinterpret_cast`-ed from the
first few bytes of a shared display list handle.

* Shared/SharedDisplayListHandle.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (270519 => 270520)


--- trunk/Source/WebKit/ChangeLog	2020-12-07 20:56:51 UTC (rev 270519)
+++ trunk/Source/WebKit/ChangeLog	2020-12-07 21:12:36 UTC (rev 270520)
@@ -1,3 +1,16 @@
+2020-12-07  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Ensure that DisplayListSharedMemoryHeader is never explicitly created or destroyed at compile-time
+        https://bugs.webkit.org/show_bug.cgi?id=219609
+
+        Reviewed by Tim Horton.
+
+        Make sure that a `DisplayListSharedMemoryHeader` is never created or destroyed by marking the constructor and
+        destructor as deleted. A `DisplayListSharedMemoryHeader` should only ever be `reinterpret_cast`-ed from the
+        first few bytes of a shared display list handle.
+
+        * Shared/SharedDisplayListHandle.h:
+
 2020-12-07  Per Arne Vollan  <pvol...@apple.com>
 
         [macOS] Deny mach-lookup to the service 'com.apple.audio.SystemSoundServer-OSX' in the WebContent process

Modified: trunk/Source/WebKit/Shared/SharedDisplayListHandle.h (270519 => 270520)


--- trunk/Source/WebKit/Shared/SharedDisplayListHandle.h	2020-12-07 20:56:51 UTC (rev 270519)
+++ trunk/Source/WebKit/Shared/SharedDisplayListHandle.h	2020-12-07 21:12:36 UTC (rev 270520)
@@ -63,6 +63,9 @@
     }
 
     struct DisplayListSharedMemoryHeader {
+        DisplayListSharedMemoryHeader() = delete;
+        ~DisplayListSharedMemoryHeader() = delete;
+
         Atomic<uint64_t> unreadBytes;
     };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to