The UChar and DeprecatedChar structs have implicit assumptions that they are two bytes on all platforms. It would be nice if there were compile-time assertions that prevented the project from compiling if these assumptions are ever violated.
A Google search yielded some solutions:
Compile Time Assertions in C (CVu 11.3)
Compile-Time Assertions & Debugging
If this is possible, it would be really helpful to check sizeof all JSObject subclasses at compile time. The collector assumes a maximum size, but it's not checked at compile time.
wtf/Assertions.h has COMPILE_ASSERT, so we just need to use it.
Created attachment 26413 [details]
Comment on attachment 26413 [details]