Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: test/cctest/cctest.h

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: merging with master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-utils.h ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index 690a8c14cd40cf9b5b9d16117b183300280dce94..7d8ad59a269c61055597c6b9957324649a00a4b7 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -583,7 +583,6 @@ class InitializedHandleScope {
std::unique_ptr<InitializedHandleScopeImpl> initialized_handle_scope_impl_;
};
-
class HandleAndZoneScope : public InitializedHandleScope {
public:
HandleAndZoneScope();
@@ -597,4 +596,18 @@ class HandleAndZoneScope : public InitializedHandleScope {
std::unique_ptr<i::Zone> main_zone_;
};
+class StaticOneByteResource : public v8::String::ExternalOneByteStringResource {
+ public:
+ explicit StaticOneByteResource(const char* data) : data_(data) {}
+
+ ~StaticOneByteResource() {}
+
+ const char* data() const { return data_; }
+
+ size_t length() const { return strlen(data_); }
+
+ private:
+ const char* data_;
+};
+
#endif // ifndef CCTEST_H_
« no previous file with comments | « src/runtime/runtime-utils.h ('k') | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698