Title: [104236] trunk/Source/WebCore
- Revision
- 104236
- Author
- [email protected]
- Date
- 2012-01-05 16:01:07 -0800 (Thu, 05 Jan 2012)
Log Message
Add a compile-time assertion for the size of CSSValue
https://bugs.webkit.org/show_bug.cgi?id=75635
Reviewed by Tony Chang.
Tightened the compile-time assertion.
* css/CSSValue.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104235 => 104236)
--- trunk/Source/WebCore/ChangeLog 2012-01-05 23:59:31 UTC (rev 104235)
+++ trunk/Source/WebCore/ChangeLog 2012-01-06 00:01:07 UTC (rev 104236)
@@ -1,3 +1,14 @@
+2012-01-05 Ryosuke Niwa <[email protected]>
+
+ Add a compile-time assertion for the size of CSSValue
+ https://bugs.webkit.org/show_bug.cgi?id=75635
+
+ Reviewed by Tony Chang.
+
+ Tightened the compile-time assertion.
+
+ * css/CSSValue.cpp:
+
2012-01-05 Adam Barth <[email protected]>
[V8] CodeGeneration for SerializedScriptValue doesn't play nice with [Constructor]
Modified: trunk/Source/WebCore/css/CSSValue.cpp (104235 => 104236)
--- trunk/Source/WebCore/css/CSSValue.cpp 2012-01-05 23:59:31 UTC (rev 104235)
+++ trunk/Source/WebCore/css/CSSValue.cpp 2012-01-06 00:01:07 UTC (rev 104236)
@@ -59,10 +59,12 @@
namespace WebCore {
-#ifdef NDEBUG
-COMPILE_ASSERT((sizeof(CSSValue) - sizeof(RefCounted<CSSValue>)) <= 4, CSS_value_packs_into_four_bytes);
-#endif
+class SameSizeAsCSSValue : public RefCounted<SameSizeAsCSSValue> {
+ unsigned char bitfields[2];
+};
+COMPILE_ASSERT(sizeof(CSSValue) == sizeof(SameSizeAsCSSValue), CSS_value_should_stay_small);
+
CSSValue::Type CSSValue::cssValueType() const
{
if (isInheritedValue())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes