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

Side by Side Diff: src/log.cc

Issue 4169005: Fix reporting of impossible nested calls of DOM functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 const Address functionAddr = 158 const Address functionAddr =
159 sample->fp + JavaScriptFrameConstants::kFunctionOffset; 159 sample->fp + JavaScriptFrameConstants::kFunctionOffset;
160 if (SafeStackFrameIterator::IsWithinBounds(sample->sp, js_entry_sp, 160 if (SafeStackFrameIterator::IsWithinBounds(sample->sp, js_entry_sp,
161 functionAddr)) { 161 functionAddr)) {
162 sample->function = Memory::Address_at(functionAddr) - kHeapObjectTag; 162 sample->function = Memory::Address_at(functionAddr) - kHeapObjectTag;
163 } 163 }
164 164
165 int i = 0; 165 int i = 0;
166 const Address callback = VMState::external_callback(); 166 const Address callback = VMState::external_callback();
167 if (callback != NULL) { 167 // Surprisingly, PC can point _exactly_ to callback start, with good
168 // probability, and this will result in reporting fake nested
169 // callback call.
170 if (callback != NULL && callback != sample->pc) {
168 sample->stack[i++] = callback; 171 sample->stack[i++] = callback;
169 } 172 }
170 173
171 SafeStackTraceFrameIterator it(sample->fp, sample->sp, 174 SafeStackTraceFrameIterator it(sample->fp, sample->sp,
172 sample->sp, js_entry_sp); 175 sample->sp, js_entry_sp);
173 while (!it.done() && i < TickSample::kMaxFramesCount) { 176 while (!it.done() && i < TickSample::kMaxFramesCount) {
174 sample->stack[i++] = 177 sample->stack[i++] =
175 reinterpret_cast<Address>(it.frame()->function_slot_object()) - 178 reinterpret_cast<Address>(it.frame()->function_slot_object()) -
176 kHeapObjectTag; 179 kHeapObjectTag;
177 it.Advance(); 180 it.Advance();
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 } 1649 }
1647 // Otherwise, if the sliding state window computation has not been 1650 // Otherwise, if the sliding state window computation has not been
1648 // started we do it now. 1651 // started we do it now.
1649 if (sliding_state_window_ == NULL) { 1652 if (sliding_state_window_ == NULL) {
1650 sliding_state_window_ = new SlidingStateWindow(); 1653 sliding_state_window_ = new SlidingStateWindow();
1651 } 1654 }
1652 #endif 1655 #endif
1653 } 1656 }
1654 1657
1655 } } // namespace v8::internal 1658 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698