| Index: src/handles.cc
|
| diff --git a/src/handles.cc b/src/handles.cc
|
| index 35c363c10c9f06e41394e07dcffcf48e0ba985fc..db16c0220b825258e07f3e05b5ce211877070d1c 100644
|
| --- a/src/handles.cc
|
| +++ b/src/handles.cc
|
| @@ -943,4 +943,20 @@ bool CompileOptimized(Handle<JSFunction> function,
|
| return CompileLazyHelper(&info, flag);
|
| }
|
|
|
| +
|
| +void LockString(Handle<String> string) {
|
| + CALL_HEAP_FUNCTION_VOID(string->GetHeap()->isolate(),
|
| + string->GetHeap()->LockString(*string));
|
| +}
|
| +
|
| +
|
| +StringLock::StringLock(Handle<String> string) : string_(string) {
|
| + LockString(string);
|
| +}
|
| +
|
| +
|
| +StringLock::~StringLock() {
|
| + string_->GetHeap()->UnlockString(*string_);
|
| +}
|
| +
|
| } } // namespace v8::internal
|
|
|