Add another check in profiler's stack iterator to ensure stability.

I made a test run of benchmarks and found another weak point. After
fixing it, benchmarks are able to run for a 100 times in a row
successfully in both builds.

Review URL: http://codereview.chromium.org/53050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9f5de7d9
......@@ -171,7 +171,13 @@ inline bool JavaScriptFrame::has_adapted_arguments() const {
inline bool JavaScriptFrame::is_at_function() const {
Object* result = function_slot_object();
// Verify that frame points at correct JS function object.
// We are verifying that function object address and
// the underlying map object address are valid, and that
// function is really a function.
return Heap::Contains(reinterpret_cast<Address>(result)) &&
result->IsHeapObject() &&
Heap::Contains(HeapObject::cast(result)->map()) &&
result->IsJSFunction();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment