From d432b5e0e24fd9ef05d04199368565cc6df73802 Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Mon, 22 Jun 2009 13:14:47 +0000 Subject: [PATCH] Sending scope types and object refs costs nothing but would save us request that should be send to retrieve scopes informations for each frame in 'backtrace' response. Review URL: http://codereview.chromium.org/131107 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2237 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mirror-delay.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mirror-delay.js b/src/mirror-delay.js index 9943b25..4f72f71 100644 --- a/src/mirror-delay.js +++ b/src/mirror-delay.js @@ -2232,6 +2232,15 @@ JSONProtocolSerializer.prototype.serializeFrame_ = function(mirror, content) { if (!IS_UNDEFINED(source_line_text)) { content.sourceLineText = source_line_text; } + + content.scopes = []; + for (var i = 0; i < mirror.scopeCount(); i++) { + var scope = mirror.scope(i); + content.scopes.push({ + type: scope.scopeType(), + index: i + }); + } } -- 2.7.4