Chromium Code Reviews| Index: src/frames.h |
| diff --git a/src/frames.h b/src/frames.h |
| index fbf99ffb42b9980027eacdf421c9a721a9aa1879..8ab4be9051bd6babb6f78f4f8a5dd7c212b545fa 100644 |
| --- a/src/frames.h |
| +++ b/src/frames.h |
| @@ -373,7 +373,6 @@ class JavaScriptFrame: public StandardFrame { |
| virtual Type type() const { return JAVA_SCRIPT; } |
| // Accessors. |
| - inline bool is_at_function() const; |
| inline Object* function() const; |
| inline Object* receiver() const; |
| inline void set_receiver(Object* value); |
| @@ -414,11 +413,19 @@ class JavaScriptFrame: public StandardFrame { |
| protected: |
| explicit JavaScriptFrame(StackFrameIterator* iterator) |
| - : StandardFrame(iterator) { } |
| + : StandardFrame(iterator), disable_heap_access_(false) { } |
| virtual Address GetCallerStackPointer() const; |
| + // When this mode is enabled it is not allowed to access heap objects. |
| + // This is a special mode used when gathering stack samples in profiler. |
| + // A shortcoming is that caller's SP value will be calculated incorrectly |
|
iposva
2009/04/13 23:16:09
Is there a way where you can ASSERT if the caller'
|
| + // (see GetCallerStackPointer implementation), but it is not used for stack |
| + // sampling. |
| + void DisableHeapAccess() { disable_heap_access_ = true; } |
| + |
| private: |
| + bool disable_heap_access_; |
| inline Object* function_slot_object() const; |
| friend class StackFrameIterator; |