Reviewers: Mads Ager, Message: I'm aware that this is a hard change to review.
I'm trying to allow read access to V8's heap without unprotecting it. The intent is to have the ENTER_V8 only where a (call to a runtime function that might) write to the heap is inevitable. There are a few other places that I'll put in another change where we have (cond) ? no_write : write. This still works in the browser for about an hour, but it's still too slow. I will investigate using the api tests to identify places that don't write to the V8 heap. The testing problem with extraneous protect/unprotect is that the writes we want to trap could occur on another thread while the heap is partially unprotected, so I'd like to leave it protected as much as feasible. Description: Remove ENTER_V8 from small API functions that do not need access to V8's heap or only need read access. This means that IsDeadCeck and EnsureInitialized could sometimes be called without having already entered the VM. To simplify things, this is made always the case. A couple of error callbacks do not need to leave V8 because they haven't entered. Consistently enter V8 after LOG_API (since LOG_API is sometimes before EnsureInitialized or IsDeadCheck). This all should have no effect unless V8 is built with ENABLE_HEAP_PROTECTION and run with --protect-heap. Please review this at http://codereview.chromium.org/56211 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/api.cc --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
