Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 7a153b0011a1b166b57748748c3404edff93a01c..14ec7467eb81ccc25f81b03459a88695f2143aa7 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2000,7 +2000,9 @@ class V8_EXPORT Symbol : public Primitive { |
// Create a symbol. If data is not NULL, it will be used as a print name. |
Michael Starzinger
2014/03/24 10:04:33
nit: Comment is outdated.
rossberg
2014/03/24 15:09:49
Done.
|
static Local<Symbol> New( |
- Isolate *isolate, const char* data = NULL, int length = -1); |
+ Isolate *isolate, Local<String> name = Local<String>()); |
+ |
+ // TODO(rossberg): Add For method (and Global?). |
V8_INLINE static Symbol* Cast(v8::Value* obj); |
private: |
@@ -2020,8 +2022,17 @@ class V8_EXPORT Private : public Data { |
Local<Value> Name() const; |
// Create a private symbol. If data is not NULL, it will be the print name. |
Michael Starzinger
2014/03/24 10:04:33
nit: Likewise.
rossberg
2014/03/24 15:09:49
Done.
|
- static Local<Private> New(Isolate *isolate, |
- Local<String> name = Local<String>()); |
+ static Local<Private> New( |
+ Isolate *isolate, Local<String> name = Local<String>()); |
+ |
+ // Retrieve a global private symbol. If a symbol with this name has not |
+ // been retrieved in the same isolate before, it is created. |
+ // Note that private symbols created this way are never collected, so |
+ // they should only be used for statically fixed properties. |
+ // Also, there is only one global name space for the names used as keys. |
+ // To minimize the potential for clashed, use qualified names as keys, |
+ // e.g., "Class#property". |
+ static Local<Private> Global(Isolate *isolate, Local<String> name); |
Michael Starzinger
2014/03/24 10:04:33
Using this name there is the risk that it gets con
rossberg
2014/03/24 15:09:49
Renamed to ForApi. Also added Symbol::For and Symb
|
private: |
Private(); |