Index: test/cctest/test-strings.cc |
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc |
index 127b7a2255a8f57196e7a8b70b020cde2549fca8..bb9a6f99af3d2a1b9f6f7395cf7d2fece71a8ae9 100644 |
--- a/test/cctest/test-strings.cc |
+++ b/test/cctest/test-strings.cc |
@@ -48,6 +48,21 @@ static const int DEEP_DEPTH = 8 * 1024; |
static const int SUPER_DEEP_DEPTH = 80 * 1024; |
+class Resource: public v8::String::ExternalStringResource, |
+ public ZoneObject { |
+ public: |
+ explicit Resource(Vector<const uc16> string): data_(string.start()) { |
+ length_ = string.length(); |
+ } |
+ virtual const uint16_t* data() const { return data_; } |
+ virtual size_t length() const { return length_; } |
+ |
+ private: |
+ const uc16* data_; |
+ size_t length_; |
+}; |
+ |
+ |
static void InitializeBuildingBlocks( |
Handle<String> building_blocks[NUMBER_OF_BUILDING_BLOCKS]) { |
// A list of pointers that we don't have any interest in cleaning up. |
@@ -83,19 +98,6 @@ static void InitializeBuildingBlocks( |
break; |
} |
case 2: { |
- class Resource: public v8::String::ExternalStringResource, |
- public ZoneObject { |
- public: |
- explicit Resource(Vector<const uc16> string): data_(string.start()) { |
- length_ = string.length(); |
- } |
- virtual const uint16_t* data() const { return data_; } |
- virtual size_t length() const { return length_; } |
- |
- private: |
- const uc16* data_; |
- size_t length_; |
- }; |
uc16* buf = Zone::NewArray<uc16>(len); |
for (int j = 0; j < len; j++) { |
buf[j] = gen() % 65536; |