throw new Error('Command not specified');
}
+ // TODO(yurys): remove request.arguments.compactFormat check once
+ // ChromeDevTools are switched to 'inlineRefs'
+ if (request.arguments && (request.arguments.inlineRefs ||
+ request.arguments.compactFormat)) {
+ response.setOption('inlineRefs', true);
+ }
+
if (request.command == 'continue') {
this.continueRequest_(request, response);
} else if (request.command == 'break') {
if (from_index < 0 || to_index < 0) {
return response.failed('Invalid frame number');
}
- if (request.arguments.compactFormat) {
- response.setOption('compactFormat', true);
- }
}
// Adjust the index.
response.setOption('includeSource', includeSource);
}
- if (request.arguments.compactFormat) {
- response.setOption('compactFormat', true);
- }
-
// Lookup handles.
var mirrors = {};
for (var i = 0; i < handles.length; i++) {
}
-JSONProtocolSerializer.prototype.compactFormat_ = function() {
- return this.options_ && this.options_.compactFormat;
+JSONProtocolSerializer.prototype.inlineRefs_ = function() {
+ return this.options_ && this.options_.inlineRefs;
}
// the mirror to the referenced mirrors.
if (reference &&
(mirror.isValue() || mirror.isScript() || mirror.isContext())) {
- if (this.compactFormat_() && mirror.isValue()) {
+ if (this.inlineRefs_() && mirror.isValue()) {
return this.serializeReferenceWithDisplayData_(mirror);
} else {
this.add_(mirror);
result.name = propertyMirror.name();
var propertyValue = propertyMirror.value();
- if (this.compactFormat_() && propertyValue.isValue()) {
+ if (this.inlineRefs_() && propertyValue.isValue()) {
result.value = this.serializeReferenceWithDisplayData_(propertyValue);
} else {
if (propertyMirror.attributes() != PropertyAttribute.None) {
content.index = mirror.scopeIndex();
content.frameIndex = mirror.frameIndex();
content.type = mirror.scopeType();
- content.object = this.serializeReference(mirror.scopeObject());
+ content.object = this.inlineRefs_() ?
+ this.serializeValue(mirror.scopeObject()) :
+ this.serializeReference(mirror.scopeObject());
}