| Index: third_party/WebKit/Source/platform/inspector_protocol/Collections.h
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Collections.h b/third_party/WebKit/Source/platform/inspector_protocol/Collections.h
|
| index 960c747bae4c65fd4cff74f20b4e7c13395c8bdb..6309284488683e07064463b67b8c87cc9e45666e 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/Collections.h
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/Collections.h
|
| @@ -11,4 +11,13 @@
|
| #include "platform/inspector_protocol/CollectionsWTF.h"
|
| #endif // V8_INSPECTOR_USE_STL
|
|
|
| +
|
| +// Macro that returns a compile time constant with the length of an array, but gives an error if passed a non-array.
|
| +template<typename T, size_t Size> char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
|
| +// GCC needs some help to deduce a 0 length array.
|
| +#if defined(__GNUC__)
|
| +template<typename T> char (&ArrayLengthHelperFunction(T (&)[0]))[0];
|
| +#endif
|
| +#define PROTOCOL_ARRAY_LENGTH(array) sizeof(::ArrayLengthHelperFunction(array))
|
| +
|
| #endif // !defined(Collections_h)
|
|
|