Reviewers: Vyacheslav Egorov,

Description:
[debugger] noRefs option for fixing blowing array refs

see https://gist.github.com/1230388 for example. When requesting bactrace -
node.js SlowBuffer appears as an argument and it's every index is being put to
the 'ref' property.

In this patch I introduced noRefs argument, that'll skip reference allocation
and remove 'ref' property from response.


BUG=
TEST=
[email protected]


Please review this at http://codereview.chromium.org/8873053/

SVN Base: gh:v8/v8@master

Affected files:
  M src/debug-debugger.js


Index: src/debug-debugger.js
diff --git a/src/debug-debugger.js b/src/debug-debugger.js
index 8cbe0b362cf423f7c8c70a94094aace081dd5b8f..9a726ae8bd2659c5b5a82a73866df6d1f9b34419 100644
--- a/src/debug-debugger.js
+++ b/src/debug-debugger.js
@@ -1349,7 +1349,9 @@ ProtocolMessage.prototype.toJSONProtocol = function() {
       bodyJson = ObjectToProtocolObject_(this.body, serializer);
     }
     json.body = bodyJson;
-    json.refs = serializer.serializeReferencedObjects();
+    if (!this.options_.noRefs) {
+      json.refs = serializer.serializeReferencedObjects();
+    }
   }
   if (this.message) {
     json.message = this.message;
@@ -1395,6 +1397,9 @@ DebugCommandProcessor.prototype.processDebugJSONRequest = function(
         if (args.inlineRefs || args.compactFormat) {
           response.setOption('inlineRefs', true);
         }
+        if (args.noRefs) {
+          response.setOption('noRefs', true);
+        }
         if (!IS_UNDEFINED(args.maxStringLength)) {
           response.setOption('maxStringLength', args.maxStringLength);
         }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to