From: yurys@chromium.org Date: Mon, 22 Jun 2009 13:14:47 +0000 (+0000) Subject: Sending scope types and object refs costs nothing but would save us request that... X-Git-Tag: upstream/4.7.83~23847 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d432b5e0e24fd9ef05d04199368565cc6df73802;p=platform%2Fupstream%2Fv8.git 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 --- diff --git a/src/mirror-delay.js b/src/mirror-delay.js index 9943b259c..4f72f71f1 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 + }); + } }