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

Unified Diff: tools/tickprocessor.js

Issue 6756031: Add initialization for has_external_callback field. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/tickprocessor.js
diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js
index 7a05ef1e1f29bb021232084f783f6fd2f57f7681..9d6bfb60ea9f5ee83917f1c9263bfe2a6f666e1e 100644
--- a/tools/tickprocessor.js
+++ b/tools/tickprocessor.js
@@ -345,7 +345,6 @@ TickProcessor.prototype.includeTick = function(vmState) {
return this.stateFilter_ == null || this.stateFilter_ == vmState;
};
-
TickProcessor.prototype.processTick = function(pc,
sp,
is_external_callback,
@@ -361,8 +360,10 @@ TickProcessor.prototype.processTick = function(pc,
if (is_external_callback) {
// Don't use PC when in external callback code, as it can point
// inside callback's code, and we will erroneously report
- // that a callback calls itself.
- pc = 0;
+ // that a callback calls itself. Instead we use tos_or_external_callback,
+ // as simply resetting PC will produce unaccounted ticks.
+ pc = tos_or_external_callback;
+ tos_or_external_callback = 0;
} else if (tos_or_external_callback) {
// Find out, if top of stack was pointing inside a JS function
// meaning that we have encountered a frameless invocation.
« no previous file with comments | « src/platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698