Index: src/handles.h |
diff --git a/src/handles.h b/src/handles.h |
index 3f4e2293a4e167b3667202caedc81a0f3222316d..0df122d68babe5f9690e66c24e795f41813f5a25 100644 |
--- a/src/handles.h |
+++ b/src/handles.h |
@@ -163,9 +163,11 @@ class HandleScope { |
// ---------------------------------------------------------------------------- |
// Handle operations. |
-// They might invoke garbage collection. The result is an handle to |
-// an object of expected type, or the handle is an error if running out |
-// of space or encountering an internal error. |
+// They might invoke garbage collection. The result is an handle to an |
+// object of expected type, or the handle is a null handle if encountering |
+// an internal error. Will not return a null handle due to out-of-memory |
+// unless otherwise stated, but will instead try to do GC and die fatally |
+// if that doesn't help. |
void NormalizeProperties(Handle<JSObject> object, |
PropertyNormalizationMode mode, |
@@ -183,7 +185,7 @@ MUST_USE_RESULT Handle<NumberDictionary> NumberDictionarySet( |
void FlattenString(Handle<String> str); |
// Flattens a string and returns the underlying external or sequential |
-// string. |
+// string. Never returns a null handle. |
Handle<String> FlattenGetString(Handle<String> str); |
Handle<Object> SetProperty(Handle<JSReceiver> object, |
@@ -379,6 +381,18 @@ class NoHandleAllocation BASE_EMBEDDED { |
#endif |
}; |
+ |
Rico
2011/09/26 07:25:30
Could we have a small comment (as in a executive s
|
+void LockString(Handle<String> string); |
Rico
2011/09/26 07:25:30
Any reason not to have this as a private method in
|
+ |
+// Scoped lock on a string. |
+class StringLock { |
+ public: |
+ explicit StringLock(Handle<String> string); |
+ ~StringLock(); |
+ private: |
+ Handle<String> string_; |
+}; |
+ |
} } // namespace v8::internal |
#endif // V8_HANDLES_H_ |