Chromium Code Reviews| Index: src/global-handles.cc |
| =================================================================== |
| --- src/global-handles.cc (revision 2717) |
| +++ src/global-handles.cc (working copy) |
| @@ -156,6 +156,10 @@ |
| if (func != NULL) { |
| v8::Persistent<v8::Object> object = ToApi<v8::Object>(handle()); |
| { |
| + // Forbid reuse of destroyed nodes as they might be already deallocated. |
| + // It's fine though to reuse nodes that were destroyed in weak callback |
| + // as those cannot be deallocated until we are back from the callback. |
| + set_first_free(NULL); |
|
Mads Ager (chromium)
2009/08/19 17:32:07
Doesn't this leak the nodes on the free list? Sho
antonm
2009/08/19 17:39:32
I don't think so. To the best of my knowledge we
|
| // Leaving V8. |
| VMState state(EXTERNAL); |
| func(object, par); |