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

Unified Diff: include/v8.h

Issue 467037: External string table. (Closed)
Patch Set: Created 11 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 | « no previous file | src/api.cc » ('j') | src/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index a8ee8d432965d0d3e87760518d86861343602de8..2e30992eddddf7ef471d3679c545d021467d2719 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -833,13 +833,26 @@ class V8EXPORT String : public Primitive {
* Returns true if the string is both external and ascii
*/
bool IsExternalAscii() const;
+
+ class V8EXPORT ExternalStringResourceBase {
+ public:
+ virtual ~ExternalStringResourceBase() {}
+ protected:
+ ExternalStringResourceBase() {}
+ private:
+ // Disallow copying and assigning.
+ ExternalStringResourceBase(const ExternalStringResourceBase&);
+ void operator=(const ExternalStringResourceBase&);
+ };
+
/**
* An ExternalStringResource is a wrapper around a two-byte string
* buffer that resides outside V8's heap. Implement an
* ExternalStringResource to manage the life cycle of the underlying
* buffer. Note that the string data must be immutable.
*/
- class V8EXPORT ExternalStringResource { // NOLINT
+ class V8EXPORT ExternalStringResource
+ : public ExternalStringResourceBase {
public:
/**
* Override the destructor to manage the life cycle of the underlying
@@ -852,10 +865,6 @@ class V8EXPORT String : public Primitive {
virtual size_t length() const = 0;
protected:
ExternalStringResource() {}
- private:
- // Disallow copying and assigning.
- ExternalStringResource(const ExternalStringResource&);
- void operator=(const ExternalStringResource&);
};
/**
@@ -869,7 +878,8 @@ class V8EXPORT String : public Primitive {
* Use String::New or convert to 16 bit data for non-ASCII.
*/
- class V8EXPORT ExternalAsciiStringResource { // NOLINT
+ class V8EXPORT ExternalAsciiStringResource
+ : public ExternalStringResourceBase {
public:
/**
* Override the destructor to manage the life cycle of the underlying
@@ -882,10 +892,6 @@ class V8EXPORT String : public Primitive {
virtual size_t length() const = 0;
protected:
ExternalAsciiStringResource() {}
- private:
- // Disallow copying and assigning.
- ExternalAsciiStringResource(const ExternalAsciiStringResource&);
- void operator=(const ExternalAsciiStringResource&);
};
/**
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698