Reviewers: Rico, Description: Fix pc to code cache so it can cope with a pointer to the start of the code object.
Please review this at http://codereview.chromium.org/7969013/ SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/frames.cc M src/objects-inl.h Index: src/frames.cc =================================================================== --- src/frames.cc (revision 9328) +++ src/frames.cc (working copy) @@ -1194,7 +1194,7 @@ HeapObject* obj = HeapObject::FromAddress(addr); int obj_size = GcSafeSizeOfCodeSpaceObject(obj); Address next_addr = addr + obj_size; - if (next_addr >= pc) return GcSafeCastToCode(obj, pc); + if (next_addr > pc) return GcSafeCastToCode(obj, pc); addr = next_addr; } } Index: src/objects-inl.h =================================================================== --- src/objects-inl.h (revision 9328) +++ src/objects-inl.h (working copy) @@ -3849,7 +3849,7 @@ bool Code::contains(byte* pc) { - return (instruction_start() <= pc) && + return (address() <= pc) && (pc <= instruction_start() + instruction_size()); } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
