| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 /** @type {!Map.<!SDK.Target, !Bindings.ResourceScriptFile>}*/ | 74 /** @type {!Map.<!SDK.Target, !Bindings.ResourceScriptFile>}*/ |
| 75 this._scriptFileForTarget = new Map(); | 75 this._scriptFileForTarget = new Map(); |
| 76 | 76 |
| 77 Common.moduleSetting('skipStackFramesPattern').addChangeListener(this._showB
lackboxInfobarIfNeeded, this); | 77 Common.moduleSetting('skipStackFramesPattern').addChangeListener(this._showB
lackboxInfobarIfNeeded, this); |
| 78 Common.moduleSetting('skipContentScripts').addChangeListener(this._showBlack
boxInfobarIfNeeded, this); | 78 Common.moduleSetting('skipContentScripts').addChangeListener(this._showBlack
boxInfobarIfNeeded, this); |
| 79 | 79 |
| 80 /** @type {!Map.<number, !Element>} */ | 80 /** @type {!Map.<number, !Element>} */ |
| 81 this._valueWidgets = new Map(); | 81 this._valueWidgets = new Map(); |
| 82 this.onBindingChanged(); | 82 this.onBindingChanged(); |
| 83 Bindings.debuggerWorkspaceBinding.addEventListener( | 83 Bindings.debuggerWorkspaceBinding.addEventListener( |
| 84 Bindings.DebuggerWorkspaceBinding.Events.SourceMappingChanged, this._o
nSourceMappingChanged, this); | 84 Bindings.DebuggerWorkspaceBinding.Events.SourceMappingChanged, this._onS
ourceMappingChanged, this); |
| 85 } | 85 } |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * @override | 88 * @override |
| 89 * @return {!Array<!UI.ToolbarItem>} | 89 * @return {!Array<!UI.ToolbarItem>} |
| 90 */ | 90 */ |
| 91 syncToolbarItems() { | 91 syncToolbarItems() { |
| 92 var result = super.syncToolbarItems(); | 92 var result = super.syncToolbarItems(); |
| 93 var originURL = Bindings.CompilerScriptMapping.uiSourceCodeOrigin(this._debu
ggerSourceCode); | 93 var originURL = Bindings.CompilerScriptMapping.uiSourceCodeOrigin(this._debu
ggerSourceCode); |
| 94 if (originURL) { | 94 if (originURL) { |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 if (!executionContext) | 564 if (!executionContext) |
| 565 return; | 565 return; |
| 566 var callFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame); | 566 var callFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame); |
| 567 if (!callFrame) | 567 if (!callFrame) |
| 568 return; | 568 return; |
| 569 | 569 |
| 570 var localScope = callFrame.localScope(); | 570 var localScope = callFrame.localScope(); |
| 571 var functionLocation = callFrame.functionLocation(); | 571 var functionLocation = callFrame.functionLocation(); |
| 572 if (localScope && functionLocation) { | 572 if (localScope && functionLocation) { |
| 573 Sources.SourceMapNamesResolver.resolveScopeInObject(localScope) | 573 Sources.SourceMapNamesResolver.resolveScopeInObject(localScope) |
| 574 .getAllProperties(false, this._prepareScopeVariables.bind(this, callFr
ame)); | 574 .getAllProperties(false, false, this._prepareScopeVariables.bind(this,
callFrame)); |
| 575 } | 575 } |
| 576 | 576 |
| 577 if (this._clearValueWidgetsTimer) { | 577 if (this._clearValueWidgetsTimer) { |
| 578 clearTimeout(this._clearValueWidgetsTimer); | 578 clearTimeout(this._clearValueWidgetsTimer); |
| 579 delete this._clearValueWidgetsTimer; | 579 delete this._clearValueWidgetsTimer; |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 | 582 |
| 583 /** | 583 /** |
| 584 * @param {!SDK.DebuggerModel.CallFrame} callFrame | 584 * @param {!SDK.DebuggerModel.CallFrame} callFrame |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 if (namesPerLine.get(i - 1) && namesPerLine.get(i - 1).has(name)) | 682 if (namesPerLine.get(i - 1) && namesPerLine.get(i - 1).has(name)) |
| 683 continue; // Only render name once in the given continuous block. | 683 continue; // Only render name once in the given continuous block. |
| 684 if (renderedNameCount) | 684 if (renderedNameCount) |
| 685 widget.createTextChild(', '); | 685 widget.createTextChild(', '); |
| 686 var nameValuePair = widget.createChild('span'); | 686 var nameValuePair = widget.createChild('span'); |
| 687 widget.__nameToToken.set(name, nameValuePair); | 687 widget.__nameToToken.set(name, nameValuePair); |
| 688 nameValuePair.createTextChild(name + ' = '); | 688 nameValuePair.createTextChild(name + ' = '); |
| 689 var value = valuesMap.get(name); | 689 var value = valuesMap.get(name); |
| 690 var propertyCount = value.preview ? value.preview.properties.length : 0; | 690 var propertyCount = value.preview ? value.preview.properties.length : 0; |
| 691 var entryCount = value.preview && value.preview.entries ? value.preview.
entries.length : 0; | 691 var entryCount = value.preview && value.preview.entries ? value.preview.
entries.length : 0; |
| 692 if (value.preview && propertyCount + entryCount < 10) | 692 if (value.preview && propertyCount + entryCount < 10) { |
| 693 formatter.appendObjectPreview(nameValuePair, value.preview); | 693 formatter.appendObjectPreview(nameValuePair, value.preview, false /* i
sEntry */); |
| 694 else | 694 } else { |
| 695 nameValuePair.appendChild(Components.ObjectPropertiesSection.createVal
ueElement(value, false)); | 695 nameValuePair.appendChild(Components.ObjectPropertiesSection.createVal
ueElement( |
| 696 value, false /* wasThrown */, false /* showPreview */)); |
| 697 } |
| 696 ++renderedNameCount; | 698 ++renderedNameCount; |
| 697 } | 699 } |
| 698 | 700 |
| 699 var widgetChanged = true; | 701 var widgetChanged = true; |
| 700 if (oldWidget) { | 702 if (oldWidget) { |
| 701 widgetChanged = false; | 703 widgetChanged = false; |
| 702 for (var name of widget.__nameToToken.keys()) { | 704 for (var name of widget.__nameToToken.keys()) { |
| 703 var oldText = oldWidget.__nameToToken.get(name) ? oldWidget.__nameToTo
ken.get(name).textContent : ''; | 705 var oldText = oldWidget.__nameToToken.get(name) ? oldWidget.__nameToTo
ken.get(name).textContent : ''; |
| 704 var newText = widget.__nameToToken.get(name) ? widget.__nameToToken.ge
t(name).textContent : ''; | 706 var newText = widget.__nameToToken.get(name) ? widget.__nameToToken.ge
t(name).textContent : ''; |
| 705 if (newText !== oldText) { | 707 if (newText !== oldText) { |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 * @param {boolean} enabled | 1289 * @param {boolean} enabled |
| 1288 */ | 1290 */ |
| 1289 _breakpointWasSetForTest(lineNumber, columnNumber, condition, enabled) { | 1291 _breakpointWasSetForTest(lineNumber, columnNumber, condition, enabled) { |
| 1290 } | 1292 } |
| 1291 | 1293 |
| 1292 /** | 1294 /** |
| 1293 * @override | 1295 * @override |
| 1294 */ | 1296 */ |
| 1295 dispose() { | 1297 dispose() { |
| 1296 Bindings.debuggerWorkspaceBinding.removeEventListener( | 1298 Bindings.debuggerWorkspaceBinding.removeEventListener( |
| 1297 Bindings.DebuggerWorkspaceBinding.Events.SourceMappingChanged, this._o
nSourceMappingChanged, this); | 1299 Bindings.DebuggerWorkspaceBinding.Events.SourceMappingChanged, this._onS
ourceMappingChanged, this); |
| 1298 this._breakpointManager.removeEventListener( | 1300 this._breakpointManager.removeEventListener( |
| 1299 Bindings.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded
, this); | 1301 Bindings.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded
, this); |
| 1300 this._breakpointManager.removeEventListener( | 1302 this._breakpointManager.removeEventListener( |
| 1301 Bindings.BreakpointManager.Events.BreakpointRemoved, this._breakpointRem
oved, this); | 1303 Bindings.BreakpointManager.Events.BreakpointRemoved, this._breakpointRem
oved, this); |
| 1302 this.uiSourceCode().removeEventListener( | 1304 this.uiSourceCode().removeEventListener( |
| 1303 Workspace.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChang
ed, this); | 1305 Workspace.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChang
ed, this); |
| 1304 this.uiSourceCode().removeEventListener( | 1306 this.uiSourceCode().removeEventListener( |
| 1305 Workspace.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCom
mitted, this); | 1307 Workspace.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCom
mitted, this); |
| 1306 this.uiSourceCode().removeEventListener( | 1308 this.uiSourceCode().removeEventListener( |
| 1307 Workspace.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfN
eeded, this); | 1309 Workspace.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfN
eeded, this); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1372 hide() { | 1374 hide() { |
| 1373 if (!this.bookmark) | 1375 if (!this.bookmark) |
| 1374 return; | 1376 return; |
| 1375 this.bookmark.clear(); | 1377 this.bookmark.clear(); |
| 1376 this.bookmark = null; | 1378 this.bookmark = null; |
| 1377 } | 1379 } |
| 1378 }; | 1380 }; |
| 1379 | 1381 |
| 1380 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book
mark'); | 1382 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book
mark'); |
| 1381 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo
l('element'); | 1383 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo
l('element'); |
| OLD | NEW |