Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: src/frames.cc

Issue 1172002: Does anyone need copy constructor for StackFrameIterator?
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 24550a2ed07f0afeadd3d062a245d0ea2a36987e..13762b59988c2b32d72d1167a2f04591b79e1b8f 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -91,6 +91,25 @@ StackFrameIterator::StackFrameIterator(bool use_top, Address fp, Address sp)
JavaScriptFrame_.DisableHeapAccess();
}
+StackFrameIterator::StackFrameIterator(const StackFrameIterator& original)
+ : STACK_FRAME_TYPE_LIST(INITIALIZE_SINGLETON)
+ frame_(NULL) {
+ this->operator=(original);
+}
+
+void StackFrameIterator::operator =(const StackFrameIterator& original) {
+ this->frame_ = this->SingletonFor(original.frame_->type());
+ this->frame_->state_ = original.frame_->state_;
+
+ this->handler_ = original.handler_;
+ this->thread_ = original.thread_;
+ this->fp_ = original.fp_;
+ this->sp_ = original.sp_;
+ this->advance_ = original.advance_;
+ this->JavaScriptFrame_.disable_heap_access_ =
+ original.JavaScriptFrame_.disable_heap_access_;
+}
+
#undef INITIALIZE_SINGLETON
@@ -171,6 +190,12 @@ StackFrame* StackFrameIterator::SingletonFor(StackFrame::Type type) {
}
+bool operator==(const StackFrameIterator& one,
+ const StackFrameIterator& another) {
+ return one.frame()->id() == another.frame()->id();
+}
+
+
// -------------------------------------------------------------------------
« no previous file with comments | « src/frames.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698