diff --git a/front_end/bindings/BlackboxManager.js b/front_end/bindings/BlackboxManager.js index 666f1a228c..cddfb9f3cf 100644 --- a/front_end/bindings/BlackboxManager.js +++ b/front_end/bindings/BlackboxManager.js @@ -142,7 +142,7 @@ export class BlackboxManager { */ async _updateScriptRanges(script, sourceMap) { let hasBlackboxedMappings = false; - if (!Bindings.blackboxManager.isBlackboxedURL(script.sourceURL, script.isContentScript())) { + if (!self.Bindings.blackboxManager.isBlackboxedURL(script.sourceURL, script.isContentScript())) { hasBlackboxedMappings = sourceMap ? sourceMap.sourceURLs().some(url => this.isBlackboxedURL(url)) : false; } if (!hasBlackboxedMappings) { @@ -265,7 +265,7 @@ export class BlackboxManager { */ _unblackboxURL(url) { let regexPatterns = self.Common.settings.moduleSetting('skipStackFramesPattern').getAsArray(); - const regexValue = Bindings.blackboxManager._urlToRegExpString(url); + const regexValue = self.Bindings.blackboxManager._urlToRegExpString(url); if (!regexValue) { return; } diff --git a/front_end/bindings/BreakpointManager.js b/front_end/bindings/BreakpointManager.js index 8665ef069b..106650b020 100644 --- a/front_end/bindings/BreakpointManager.js +++ b/front_end/bindings/BreakpointManager.js @@ -160,9 +160,9 @@ export class BreakpointManager extends Common.Object { * @return {!Promise>} */ possibleBreakpoints(uiSourceCode, textRange) { - const startLocations = Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( + const startLocations = self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( uiSourceCode, textRange.startLine, textRange.startColumn); - const endLocations = Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( + const endLocations = self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( uiSourceCode, textRange.endLine, textRange.endColumn); const endLocationByModel = new Map(); for (const location of endLocations) { @@ -590,7 +590,7 @@ export class ModelBreakpoint { let debuggerLocation = null; if (uiSourceCode) { const locations = - Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber); + self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber); debuggerLocation = locations.find(location => location.debuggerModel === this._debuggerModel); } let newState; diff --git a/front_end/bindings/CSSWorkspaceBinding.js b/front_end/bindings/CSSWorkspaceBinding.js index b76c477409..21752a0cf5 100644 --- a/front_end/bindings/CSSWorkspaceBinding.js +++ b/front_end/bindings/CSSWorkspaceBinding.js @@ -242,7 +242,7 @@ export class ModelInfo { let uiLocation = null; uiLocation = uiLocation || this._sassSourceMapping.rawLocationToUILocation(rawLocation); uiLocation = uiLocation || this._stylesSourceMapping.rawLocationToUILocation(rawLocation); - uiLocation = uiLocation || Bindings.resourceMapping.cssLocationToUILocation(rawLocation); + uiLocation = uiLocation || self.Bindings.resourceMapping.cssLocationToUILocation(rawLocation); return uiLocation; } @@ -259,7 +259,7 @@ export class ModelInfo { if (rawLocations.length) { return rawLocations; } - return Bindings.resourceMapping.uiLocationToCSSLocations(uiLocation); + return self.Bindings.resourceMapping.uiLocationToCSSLocations(uiLocation); } _dispose() { @@ -297,7 +297,7 @@ export class LiveLocation extends LiveLocationWithPool { return null; } const rawLocation = new SDK.CSSLocation(this._header, this._lineNumber, this._columnNumber); - return Bindings.cssWorkspaceBinding.rawLocationToUILocation(rawLocation); + return self.Bindings.cssWorkspaceBinding.rawLocationToUILocation(rawLocation); } /** diff --git a/front_end/bindings/CompilerScriptMapping.js b/front_end/bindings/CompilerScriptMapping.js index 9b67c25148..5b401da546 100644 --- a/front_end/bindings/CompilerScriptMapping.js +++ b/front_end/bindings/CompilerScriptMapping.js @@ -228,7 +228,7 @@ export class CompilerScriptMapping { const sourceMap = /** @type {!SDK.SourceMap} */ (event.data.sourceMap); this._removeStubUISourceCode(script); - if (Bindings.blackboxManager.isBlackboxedURL(script.sourceURL, script.isContentScript())) { + if (self.Bindings.blackboxManager.isBlackboxedURL(script.sourceURL, script.isContentScript())) { this._sourceMapAttachedForTest(sourceMap); return; } diff --git a/front_end/bindings/DebuggerWorkspaceBinding.js b/front_end/bindings/DebuggerWorkspaceBinding.js index c6ea2b564c..d9792de9eb 100644 --- a/front_end/bindings/DebuggerWorkspaceBinding.js +++ b/front_end/bindings/DebuggerWorkspaceBinding.js @@ -340,7 +340,7 @@ class ModelData { } uiLocation = uiLocation || this._compilerMapping.rawLocationToUILocation(rawLocation); uiLocation = uiLocation || this._resourceMapping.rawLocationToUILocation(rawLocation); - uiLocation = uiLocation || Bindings.resourceMapping.jsLocationToUILocation(rawLocation); + uiLocation = uiLocation || self.Bindings.resourceMapping.jsLocationToUILocation(rawLocation); uiLocation = uiLocation || this._defaultMapping.rawLocationToUILocation(rawLocation); return /** @type {!Workspace.UILocation} */ (uiLocation); } @@ -375,7 +375,7 @@ class ModelData { this._resourceMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber); locations = locations.length ? locations : - Bindings.resourceMapping.uiLocationToJSLocations(uiSourceCode, lineNumber, columnNumber); + self.Bindings.resourceMapping.uiLocationToJSLocations(uiSourceCode, lineNumber, columnNumber); locations = locations.length ? locations : this._defaultMapping.uiLocationToRawLocations(uiSourceCode, lineNumber, columnNumber); @@ -444,7 +444,7 @@ class Location extends LiveLocationWithPool { */ isBlackboxed() { const uiLocation = this.uiLocation(); - return uiLocation ? Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode) : false; + return uiLocation ? self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode) : false; } } diff --git a/front_end/bindings/PresentationConsoleMessageHelper.js b/front_end/bindings/PresentationConsoleMessageHelper.js index 217409531d..81d5042ce5 100644 --- a/front_end/bindings/PresentationConsoleMessageHelper.js +++ b/front_end/bindings/PresentationConsoleMessageHelper.js @@ -214,7 +214,8 @@ export class PresentationConsoleMessage { this._level = message.level === SDK.ConsoleMessage.MessageLevel.Error ? Workspace.UISourceCode.Message.Level.Error : Workspace.UISourceCode.Message.Level.Warning; - Bindings.debuggerWorkspaceBinding.createLiveLocation(rawLocation, this._updateLocation.bind(this), locationPool); + self.Bindings.debuggerWorkspaceBinding.createLiveLocation( + rawLocation, this._updateLocation.bind(this), locationPool); } /** diff --git a/front_end/bindings/ResourceMapping.js b/front_end/bindings/ResourceMapping.js index d530d4afb7..ce5db7c760 100644 --- a/front_end/bindings/ResourceMapping.js +++ b/front_end/bindings/ResourceMapping.js @@ -384,7 +384,7 @@ class Binding { continue; } script[offsetSymbol] = scriptOffset.rebaseAfterTextEdit(oldRange, newRange); - Bindings.debuggerWorkspaceBinding.updateLocations(script); + self.Bindings.debuggerWorkspaceBinding.updateLocations(script); } for (const style of styles) { const styleOffset = @@ -393,7 +393,7 @@ class Binding { continue; } style[offsetSymbol] = styleOffset.rebaseAfterTextEdit(oldRange, newRange); - Bindings.cssWorkspaceBinding.updateLocations(style); + self.Bindings.cssWorkspaceBinding.updateLocations(style); } } this._uiSourceCode.addRevision(text.value()); diff --git a/front_end/bindings/ResourceScriptMapping.js b/front_end/bindings/ResourceScriptMapping.js index 5dfc13d42a..677b399e5f 100644 --- a/front_end/bindings/ResourceScriptMapping.js +++ b/front_end/bindings/ResourceScriptMapping.js @@ -338,7 +338,7 @@ export class ResourceScriptFile extends Common.Object { return; } const debuggerModel = this._resourceScriptMapping._debuggerModel; - const breakpoints = Bindings.breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode) + const breakpoints = self.Bindings.breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode) .map(breakpointLocation => breakpointLocation.breakpoint); const source = this._uiSourceCode.workingCopy(); debuggerModel.setScriptSource(this._script.scriptId, source, scriptSourceWasSet.bind(this)); diff --git a/front_end/bindings/SASSSourceMapping.js b/front_end/bindings/SASSSourceMapping.js index 3a9fbfb284..7c30cd0ff9 100644 --- a/front_end/bindings/SASSSourceMapping.js +++ b/front_end/bindings/SASSSourceMapping.js @@ -86,7 +86,7 @@ export class SASSSourceMapping { uiSourceCode[_sourceMapSymbol] = sourceMap; this._project.addUISourceCodeWithProvider(uiSourceCode, contentProvider, metadata, mimeType); } - Bindings.cssWorkspaceBinding.updateLocations(header); + self.Bindings.cssWorkspaceBinding.updateLocations(header); this._sourceMapAttachedForTest(sourceMap); } @@ -105,7 +105,7 @@ export class SASSSourceMapping { this._project.removeFile(sassURL); } } - Bindings.cssWorkspaceBinding.updateLocations(header); + self.Bindings.cssWorkspaceBinding.updateLocations(header); } /** @@ -125,7 +125,7 @@ export class SASSSourceMapping { uiSourceCode.setWorkingCopy(sassText); } for (const header of headers) { - Bindings.cssWorkspaceBinding.updateLocations(header); + self.Bindings.cssWorkspaceBinding.updateLocations(header); } } diff --git a/front_end/bindings/bindings-legacy.js b/front_end/bindings/bindings-legacy.js index 96d94b37ad..0e8f4d1e78 100644 --- a/front_end/bindings/bindings-legacy.js +++ b/front_end/bindings/bindings-legacy.js @@ -103,7 +103,7 @@ Bindings.TempFile = BindingsModule.TempFile.TempFile; Bindings.TempFileBackingStorage = BindingsModule.TempFile.TempFileBackingStorage; /** @type {!BindingsModule.BlackboxManager.BlackboxManager} */ -Bindings.blackboxManager; +self.Bindings.blackboxManager; /** @typedef {{ * breakpoint: !BindingsModule.BreakpointManager.Breakpoint, @@ -113,17 +113,17 @@ Bindings.blackboxManager; Bindings.BreakpointManager.BreakpointLocation; /** @type {!BindingsModule.BreakpointManager.BreakpointManager} */ -Bindings.breakpointManager; +self.Bindings.breakpointManager; /** * @type {!BindingsModule.CSSWorkspaceBinding.CSSWorkspaceBinding} */ -Bindings.cssWorkspaceBinding; +self.Bindings.cssWorkspaceBinding; /** * @type {!BindingsModule.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding} */ -Bindings.debuggerWorkspaceBinding; +self.Bindings.debuggerWorkspaceBinding; /** * @typedef {{ diff --git a/front_end/bindings_test_runner/BindingsTestRunner.js b/front_end/bindings_test_runner/BindingsTestRunner.js index f348497854..b021e45475 100644 --- a/front_end/bindings_test_runner/BindingsTestRunner.js +++ b/front_end/bindings_test_runner/BindingsTestRunner.js @@ -199,14 +199,15 @@ const createdSymbol = Symbol('LiveLocationCreated'); BindingsTestRunner.createDebuggerLiveLocation = function(name, urlSuffix, lineNumber, columnNumber) { const script = TestRunner.debuggerModel.scripts().find(script => script.sourceURL.endsWith(urlSuffix)); const rawLocation = TestRunner.debuggerModel.createRawLocation(script, lineNumber || 0, columnNumber || 0); - return Bindings.debuggerWorkspaceBinding.createLiveLocation( + return self.Bindings.debuggerWorkspaceBinding.createLiveLocation( rawLocation, updateDelegate.bind(null, name), locationPool); }; BindingsTestRunner.createCSSLiveLocation = function(name, urlSuffix, lineNumber, columnNumber) { const header = TestRunner.cssModel.styleSheetHeaders().find(header => header.resourceURL().endsWith(urlSuffix)); const rawLocation = new SDK.CSSLocation(header, lineNumber || 0, columnNumber || 0); - return Bindings.cssWorkspaceBinding.createLiveLocation(rawLocation, updateDelegate.bind(null, name), locationPool); + return self.Bindings.cssWorkspaceBinding.createLiveLocation( + rawLocation, updateDelegate.bind(null, name), locationPool); }; function updateDelegate(name, liveLocation) { diff --git a/front_end/components/JSPresentationUtils.js b/front_end/components/JSPresentationUtils.js index ce104564d1..60f65fb03c 100644 --- a/front_end/components/JSPresentationUtils.js +++ b/front_end/components/JSPresentationUtils.js @@ -64,7 +64,7 @@ export function buildStackTracePreviewContents(target, linkifier, options = {}) if (link) { link.addEventListener('contextmenu', populateContextMenu.bind(null, link)); const uiLocation = Linkifier.uiLocation(link); - if (uiLocation && Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode)) { + if (uiLocation && self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode)) { shouldHide = true; } row.createChild('td').textContent = ' @ '; @@ -89,13 +89,13 @@ export function buildStackTracePreviewContents(target, linkifier, options = {}) const contextMenu = new UI.ContextMenu(event); event.consume(true); const uiLocation = Linkifier.uiLocation(link); - if (uiLocation && Bindings.blackboxManager.canBlackboxUISourceCode(uiLocation.uiSourceCode)) { - if (Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode)) { + if (uiLocation && self.Bindings.blackboxManager.canBlackboxUISourceCode(uiLocation.uiSourceCode)) { + if (self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode)) { contextMenu.debugSection().appendItem( - ls`Stop blackboxing`, () => Bindings.blackboxManager.unblackboxUISourceCode(uiLocation.uiSourceCode)); + ls`Stop blackboxing`, () => self.Bindings.blackboxManager.unblackboxUISourceCode(uiLocation.uiSourceCode)); } else { contextMenu.debugSection().appendItem( - ls`Blackbox script`, () => Bindings.blackboxManager.blackboxUISourceCode(uiLocation.uiSourceCode)); + ls`Blackbox script`, () => self.Bindings.blackboxManager.blackboxUISourceCode(uiLocation.uiSourceCode)); } } contextMenu.appendApplicableItems(event); diff --git a/front_end/components/Linkifier.js b/front_end/components/Linkifier.js index a1c3507681..f26a409b23 100644 --- a/front_end/components/Linkifier.js +++ b/front_end/components/Linkifier.js @@ -183,7 +183,7 @@ export class Linkifier { const info = Linkifier._linkInfo(anchor); info.enableDecorator = this._useLinkDecorator; info.fallback = fallbackAnchor; - info.liveLocation = Bindings.debuggerWorkspaceBinding.createLiveLocation( + info.liveLocation = self.Bindings.debuggerWorkspaceBinding.createLiveLocation( rawLocation, this._updateAnchor.bind(this, anchor), /** @type {!Bindings.LiveLocationPool} */ (this._locationPoolByTarget.get(rawLocation.debuggerModel.target()))); @@ -257,7 +257,7 @@ export class Linkifier { const info = Linkifier._linkInfo(anchor); info.enableDecorator = this._useLinkDecorator; info.fallback = fallbackAnchor; - info.liveLocation = Bindings.debuggerWorkspaceBinding.createStackTraceTopFrameLiveLocation( + info.liveLocation = self.Bindings.debuggerWorkspaceBinding.createStackTraceTopFrameLiveLocation( rawLocations, this._updateAnchor.bind(this, anchor), /** @type {!Bindings.LiveLocationPool} */ (this._locationPoolByTarget.get(target))); @@ -275,7 +275,7 @@ export class Linkifier { const anchor = Linkifier._createLink('', classes || ''); const info = Linkifier._linkInfo(anchor); info.enableDecorator = this._useLinkDecorator; - info.liveLocation = Bindings.cssWorkspaceBinding.createLiveLocation( + info.liveLocation = self.Bindings.cssWorkspaceBinding.createLiveLocation( rawLocation, this._updateAnchor.bind(this, anchor), /** @type {!Bindings.LiveLocationPool} */ (this._locationPoolByTarget.get(rawLocation.cssModel().target()))); diff --git a/front_end/coverage/CoverageDecorationManager.js b/front_end/coverage/CoverageDecorationManager.js index 3fa7cccb34..b1c4e94b61 100644 --- a/front_end/coverage/CoverageDecorationManager.js +++ b/front_end/coverage/CoverageDecorationManager.js @@ -144,7 +144,7 @@ export class CoverageDecorationManager { const result = []; const contentType = uiSourceCode.contentType(); if (contentType.hasScripts()) { - let locations = await Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, line, column); + let locations = await self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, line, column); locations = locations.filter(location => !!location.script()); for (const location of locations) { const script = location.script(); @@ -163,8 +163,8 @@ export class CoverageDecorationManager { } } if (contentType.isStyleSheet() || contentType.isDocument()) { - const rawStyleLocations = - Bindings.cssWorkspaceBinding.uiLocationToRawLocations(new Workspace.UILocation(uiSourceCode, line, column)); + const rawStyleLocations = self.Bindings.cssWorkspaceBinding.uiLocationToRawLocations( + new Workspace.UILocation(uiSourceCode, line, column)); for (const location of rawStyleLocations) { const header = location.header(); if (!header) { diff --git a/front_end/elements/ColorSwatchPopoverIcon.js b/front_end/elements/ColorSwatchPopoverIcon.js index 3a02041f75..68f8b876a7 100644 --- a/front_end/elements/ColorSwatchPopoverIcon.js +++ b/front_end/elements/ColorSwatchPopoverIcon.js @@ -51,7 +51,8 @@ export class BezierPopoverIcon { this._originalPropertyText = this._treeElement.property.propertyText; this._treeElement.parentPane().setEditingStyle(true); - const uiLocation = Bindings.cssWorkspaceBinding.propertyUILocation(this._treeElement.property, false /* forName */); + const uiLocation = + self.Bindings.cssWorkspaceBinding.propertyUILocation(this._treeElement.property, false /* forName */); if (uiLocation) { Common.Revealer.reveal(uiLocation, true /* omitFocus */); } @@ -190,7 +191,8 @@ export class ColorSwatchPopoverIcon { this._originalPropertyText = this._treeElement.property.propertyText; this._treeElement.parentPane().setEditingStyle(true); - const uiLocation = Bindings.cssWorkspaceBinding.propertyUILocation(this._treeElement.property, false /* forName */); + const uiLocation = + self.Bindings.cssWorkspaceBinding.propertyUILocation(this._treeElement.property, false /* forName */); if (uiLocation) { Common.Revealer.reveal(uiLocation, true /* omitFocus */); } @@ -304,7 +306,8 @@ export class ShadowSwatchPopoverHelper { this._originalPropertyText = this._treeElement.property.propertyText; this._treeElement.parentPane().setEditingStyle(true); - const uiLocation = Bindings.cssWorkspaceBinding.propertyUILocation(this._treeElement.property, false /* forName */); + const uiLocation = + self.Bindings.cssWorkspaceBinding.propertyUILocation(this._treeElement.property, false /* forName */); if (uiLocation) { Common.Revealer.reveal(uiLocation, true /* omitFocus */); } diff --git a/front_end/elements/StylePropertyTreeElement.js b/front_end/elements/StylePropertyTreeElement.js index 429689731b..c857cdd407 100644 --- a/front_end/elements/StylePropertyTreeElement.js +++ b/front_end/elements/StylePropertyTreeElement.js @@ -573,7 +573,7 @@ export class StylePropertyTreeElement extends UI.TreeElement { return; } const propertyNameClicked = element === this.nameElement; - const uiLocation = Bindings.cssWorkspaceBinding.propertyUILocation(this.property, propertyNameClicked); + const uiLocation = self.Bindings.cssWorkspaceBinding.propertyUILocation(this.property, propertyNameClicked); if (uiLocation) { Common.Revealer.reveal(uiLocation, omitFocus); } diff --git a/front_end/elements/StylesSidebarPane.js b/front_end/elements/StylesSidebarPane.js index 5646e2a108..56ae754659 100644 --- a/front_end/elements/StylesSidebarPane.js +++ b/front_end/elements/StylesSidebarPane.js @@ -1751,7 +1751,7 @@ export class StylePropertiesSection { event.consume(true); return; } - const uiLocation = Bindings.cssWorkspaceBinding.rawLocationToUILocation(location); + const uiLocation = self.Bindings.cssWorkspaceBinding.rawLocationToUILocation(location); if (uiLocation) { Common.Revealer.reveal(uiLocation); } @@ -1885,7 +1885,7 @@ export class StylePropertiesSection { * @param {boolean} focus */ static _revealSelectorSource(rawLocation, focus) { - const uiLocation = Bindings.cssWorkspaceBinding.rawLocationToUILocation(rawLocation); + const uiLocation = self.Bindings.cssWorkspaceBinding.rawLocationToUILocation(rawLocation); if (uiLocation) { Common.Revealer.reveal(uiLocation, !focus); } diff --git a/front_end/emulation/MediaQueryInspector.js b/front_end/emulation/MediaQueryInspector.js index 2e15eac035..9ebe47b8b8 100644 --- a/front_end/emulation/MediaQueryInspector.js +++ b/front_end/emulation/MediaQueryInspector.js @@ -113,7 +113,7 @@ export class MediaQueryInspector extends UI.Widget { const locations = mediaQueryMarker._locations; const uiLocations = new Map(); for (let i = 0; i < locations.length; ++i) { - const uiLocation = Bindings.cssWorkspaceBinding.rawLocationToUILocation(locations[i]); + const uiLocation = self.Bindings.cssWorkspaceBinding.rawLocationToUILocation(locations[i]); if (!uiLocation) { continue; } diff --git a/front_end/formatter/SourceFormatter.js b/front_end/formatter/SourceFormatter.js index b5da6166f1..188193b3de 100644 --- a/front_end/formatter/SourceFormatter.js +++ b/front_end/formatter/SourceFormatter.js @@ -171,7 +171,7 @@ export class SourceFormatter { */ class ScriptMapping { constructor() { - Bindings.debuggerWorkspaceBinding.addSourceMapping(this); + self.Bindings.debuggerWorkspaceBinding.addSourceMapping(this); } /** @@ -222,7 +222,7 @@ class ScriptMapping { // Here we have a script that is displayed on its own (i.e. it has a dedicated uiSourceCode). This means it is // either a stand-alone script or an inline script with a #sourceURL= and in both cases we can just forward the // question to the original (unformatted) source code. - const rawLocations = Bindings.debuggerWorkspaceBinding.uiLocationToRawLocationsForUnformattedJavaScript( + const rawLocations = self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocationsForUnformattedJavaScript( formatData.originalSourceCode, originalLine, originalColumn); console.assert(rawLocations.every(l => l && !!l.script())); return rawLocations; @@ -262,7 +262,7 @@ class ScriptMapping { } } for (const script of scripts) { - Bindings.debuggerWorkspaceBinding.updateLocations(script); + self.Bindings.debuggerWorkspaceBinding.updateLocations(script); } } @@ -285,7 +285,7 @@ class ScriptMapping { !uiSourceCode[SourceFormatData._formatDataSymbol] || uiSourceCode[SourceFormatData._formatDataSymbol] === uiSourceCode); const rawLocations = - Bindings.debuggerWorkspaceBinding.uiLocationToRawLocationsForUnformattedJavaScript(uiSourceCode, 0, 0); + self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocationsForUnformattedJavaScript(uiSourceCode, 0, 0); return rawLocations.map(location => location.script()).filter(script => !!script); } return []; @@ -297,7 +297,7 @@ class ScriptMapping { */ class StyleMapping { constructor() { - Bindings.cssWorkspaceBinding.addSourceMapping(this); + self.Bindings.cssWorkspaceBinding.addSourceMapping(this); this._headersSymbol = Symbol('Formatter.SourceFormatter.StyleMapping._headersSymbol'); } @@ -348,7 +348,7 @@ class StyleMapping { original[this._headersSymbol] = null; headers.forEach(header => delete header[SourceFormatData._formatDataSymbol]); } - headers.forEach(header => Bindings.cssWorkspaceBinding.updateLocations(header)); + headers.forEach(header => self.Bindings.cssWorkspaceBinding.updateLocations(header)); } /** @@ -364,7 +364,7 @@ class StyleMapping { .filter(header => header.isInline && !header.hasSourceURL); } } else if (uiSourceCode.contentType().isStyleSheet()) { - const rawLocations = Bindings.cssWorkspaceBinding.uiLocationToRawLocations(uiSourceCode.uiLocation(0, 0)); + const rawLocations = self.Bindings.cssWorkspaceBinding.uiLocationToRawLocations(uiSourceCode.uiLocation(0, 0)); return rawLocations.map(rawLocation => rawLocation.header()).filter(header => !!header); } return []; diff --git a/front_end/main/MainImpl.js b/front_end/main/MainImpl.js index 66964da04b..28dc9035d4 100644 --- a/front_end/main/MainImpl.js +++ b/front_end/main/MainImpl.js @@ -212,21 +212,21 @@ export class MainImpl { Workspace.workspace = new Workspace.Workspace(); self.Bindings.networkProjectManager = new Bindings.NetworkProjectManager(); - Bindings.resourceMapping = new Bindings.ResourceMapping(self.SDK.targetManager, Workspace.workspace); + self.Bindings.resourceMapping = new Bindings.ResourceMapping(self.SDK.targetManager, Workspace.workspace); new Bindings.PresentationConsoleMessageManager(); - Bindings.cssWorkspaceBinding = new Bindings.CSSWorkspaceBinding(self.SDK.targetManager, Workspace.workspace); - Bindings.debuggerWorkspaceBinding = + self.Bindings.cssWorkspaceBinding = new Bindings.CSSWorkspaceBinding(self.SDK.targetManager, Workspace.workspace); + self.Bindings.debuggerWorkspaceBinding = new Bindings.DebuggerWorkspaceBinding(self.SDK.targetManager, Workspace.workspace); - Bindings.breakpointManager = - new Bindings.BreakpointManager(Workspace.workspace, self.SDK.targetManager, Bindings.debuggerWorkspaceBinding); + self.Bindings.breakpointManager = new Bindings.BreakpointManager( + Workspace.workspace, self.SDK.targetManager, self.Bindings.debuggerWorkspaceBinding); Extensions.extensionServer = new Extensions.ExtensionServer(); new Persistence.FileSystemWorkspaceBinding(Persistence.isolatedFileSystemManager, Workspace.workspace); - Persistence.persistence = new Persistence.Persistence(Workspace.workspace, Bindings.breakpointManager); + Persistence.persistence = new Persistence.Persistence(Workspace.workspace, self.Bindings.breakpointManager); Persistence.networkPersistenceManager = new Persistence.NetworkPersistenceManager(Workspace.workspace); new ExecutionContextSelector(self.SDK.targetManager, UI.context); - Bindings.blackboxManager = new Bindings.BlackboxManager(Bindings.debuggerWorkspaceBinding); + self.Bindings.blackboxManager = new Bindings.BlackboxManager(self.Bindings.debuggerWorkspaceBinding); new PauseListener(); diff --git a/front_end/perf_ui/LineLevelProfile.js b/front_end/perf_ui/LineLevelProfile.js index 19431752e7..68f716ac95 100644 --- a/front_end/perf_ui/LineLevelProfile.js +++ b/front_end/perf_ui/LineLevelProfile.js @@ -195,7 +195,8 @@ export class Presentation { this._type = type; this._time = time; this._uiLocation = null; - Bindings.debuggerWorkspaceBinding.createLiveLocation(rawLocation, this.updateLocation.bind(this), locationPool); + self.Bindings.debuggerWorkspaceBinding.createLiveLocation( + rawLocation, this.updateLocation.bind(this), locationPool); } /** diff --git a/front_end/profiler/ProfileView.js b/front_end/profiler/ProfileView.js index 5d3d9d9911..938a9d5274 100644 --- a/front_end/profiler/ProfileView.js +++ b/front_end/profiler/ProfileView.js @@ -334,7 +334,7 @@ export class ProfileView extends UI.SimpleView { } const location = /** @type {!SDK.DebuggerModel.Location} */ ( debuggerModel.createRawLocation(script, node.lineNumber, node.columnNumber)); - Common.Revealer.reveal(Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location)); + Common.Revealer.reveal(self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location)); } _changeView() { diff --git a/front_end/sdk_test_runner/PageMockTestRunner.js b/front_end/sdk_test_runner/PageMockTestRunner.js index c4d439a36e..165535ed21 100644 --- a/front_end/sdk_test_runner/PageMockTestRunner.js +++ b/front_end/sdk_test_runner/PageMockTestRunner.js @@ -43,8 +43,8 @@ SDKTestRunner.PageMock = class { } connectAsMainTarget(targetName) { - Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget); - Bindings.resourceMapping._resetForTest(TestRunner.mainTarget); + self.Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget); + self.Bindings.resourceMapping._resetForTest(TestRunner.mainTarget); this._enabledDomains.clear(); self.SDK.targetManager._targets = []; diff --git a/front_end/sources/CallStackSidebarPane.js b/front_end/sources/CallStackSidebarPane.js index f9ce6d7a0a..de983929cc 100644 --- a/front_end/sources/CallStackSidebarPane.js +++ b/front_end/sources/CallStackSidebarPane.js @@ -393,11 +393,11 @@ export class CallStackSidebarPane extends UI.SimpleView { if (uiSourceCode.project().type() === Workspace.projectTypes.FileSystem) { return; } - const canBlackbox = Bindings.blackboxManager.canBlackboxUISourceCode(uiSourceCode); - const isBlackboxed = Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourceCode); + const canBlackbox = self.Bindings.blackboxManager.canBlackboxUISourceCode(uiSourceCode); + const isBlackboxed = self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourceCode); const isContentScript = uiSourceCode.project().type() === Workspace.projectTypes.ContentScripts; - const manager = Bindings.blackboxManager; + const manager = self.Bindings.blackboxManager; if (canBlackbox) { if (isBlackboxed) { contextMenu.defaultSection().appendItem( @@ -492,7 +492,7 @@ export class Item { */ static createForDebuggerCallFrame(frame, locationPool, updateDelegate) { const item = new Item(UI.beautifyFunctionName(frame.functionName), updateDelegate); - Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( + self.Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( frame.location(), item._update.bind(item), locationPool); return item; } @@ -520,7 +520,7 @@ export class Item { item.linkText = (frame.url || '') + ':' + (frame.lineNumber + 1); item.updateDelegate(item); } else { - Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( + self.Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( rawLocation, item._update.bind(item), locationPool); } return item; @@ -568,7 +568,8 @@ export class Item { */ _update(liveLocation) { const uiLocation = liveLocation.uiLocation(); - this.isBlackboxed = uiLocation ? Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode) : false; + this.isBlackboxed = + uiLocation ? self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode) : false; this.linkText = uiLocation ? uiLocation.linkText() : ''; this.uiLocation = uiLocation; this.updateDelegate(this); diff --git a/front_end/sources/DebuggerPlugin.js b/front_end/sources/DebuggerPlugin.js index e09c90126f..837f506cb0 100644 --- a/front_end/sources/DebuggerPlugin.js +++ b/front_end/sources/DebuggerPlugin.js @@ -59,7 +59,7 @@ export class DebuggerPlugin extends Plugin { this._controlTimeout = null; this._scriptsPanel = SourcesPanel.instance(); - this._breakpointManager = Bindings.breakpointManager; + this._breakpointManager = self.Bindings.breakpointManager; if (uiSourceCode.project().type() === Workspace.projectTypes.Debugger) { this._textEditor.element.classList.add('source-frame-debugger-script'); } @@ -167,7 +167,7 @@ export class DebuggerPlugin extends Plugin { return; } const projectType = uiSourceCode.project().type(); - if (!Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourceCode)) { + if (!self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiSourceCode)) { this._hideBlackboxInfobar(); return; } @@ -196,9 +196,9 @@ export class DebuggerPlugin extends Plugin { unblackboxLink.addEventListener('click', unblackbox, false); function unblackbox() { - Bindings.blackboxManager.unblackboxUISourceCode(uiSourceCode); + self.Bindings.blackboxManager.unblackboxUISourceCode(uiSourceCode); if (projectType === Workspace.projectTypes.ContentScripts) { - Bindings.blackboxManager.unblackboxContentScripts(); + self.Bindings.blackboxManager.unblackboxContentScripts(); } } this._textEditor.attachInfobar(this._blackboxInfobar); @@ -321,7 +321,7 @@ export class DebuggerPlugin extends Plugin { function populateSourceMapMembers() { if (this._uiSourceCode.project().type() === Workspace.projectTypes.Network && self.Common.settings.moduleSetting('jsSourceMapsEnabled').get() && - !Bindings.blackboxManager.isBlackboxedUISourceCode(this._uiSourceCode)) { + !self.Bindings.blackboxManager.isBlackboxedUISourceCode(this._uiSourceCode)) { if (this._scriptFileForDebuggerModel.size) { const scriptFile = this._scriptFileForDebuggerModel.valuesArray()[0]; const addSourceMapURLLabel = Common.UIString('Add source map\u2026'); @@ -977,9 +977,9 @@ export class DebuggerPlugin extends Plugin { return; } - const functionUILocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation( + const functionUILocation = self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation( /** @type {!SDK.DebuggerModel.Location} */ (callFrame.functionLocation())); - const executionUILocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(callFrame.location()); + const executionUILocation = self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(callFrame.location()); if (!functionUILocation || !executionUILocation || functionUILocation.uiSourceCode !== this._uiSourceCode || executionUILocation.uiSourceCode !== this._uiSourceCode) { return; @@ -1502,7 +1502,7 @@ export class DebuggerPlugin extends Plugin { _updateScriptFiles() { for (const debuggerModel of self.SDK.targetManager.models(SDK.DebuggerModel)) { - const scriptFile = Bindings.debuggerWorkspaceBinding.scriptFile(this._uiSourceCode, debuggerModel); + const scriptFile = self.Bindings.debuggerWorkspaceBinding.scriptFile(this._uiSourceCode, debuggerModel); if (scriptFile) { this._updateScriptFile(debuggerModel); } @@ -1514,7 +1514,7 @@ export class DebuggerPlugin extends Plugin { */ _updateScriptFile(debuggerModel) { const oldScriptFile = this._scriptFileForDebuggerModel.get(debuggerModel); - const newScriptFile = Bindings.debuggerWorkspaceBinding.scriptFile(this._uiSourceCode, debuggerModel); + const newScriptFile = self.Bindings.debuggerWorkspaceBinding.scriptFile(this._uiSourceCode, debuggerModel); this._scriptFileForDebuggerModel.delete(debuggerModel); if (oldScriptFile) { oldScriptFile.removeEventListener(Bindings.ResourceScriptFile.Events.DidMergeToVM, this._didMergeToVM, this); @@ -1683,7 +1683,7 @@ export class DebuggerPlugin extends Plugin { this._clearExecutionLine(); return; } - Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( + self.Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( callFrame.location(), this._executionLineChanged.bind(this), this._liveLocationPool); } diff --git a/front_end/sources/JavaScriptBreakpointsSidebarPane.js b/front_end/sources/JavaScriptBreakpointsSidebarPane.js index ace5159648..5a6d6bd2c6 100644 --- a/front_end/sources/JavaScriptBreakpointsSidebarPane.js +++ b/front_end/sources/JavaScriptBreakpointsSidebarPane.js @@ -12,7 +12,7 @@ export class JavaScriptBreakpointsSidebarPane extends UI.ThrottledWidget { super(true); this.registerRequiredCSS('sources/javaScriptBreakpointsSidebarPane.css'); - this._breakpointManager = Bindings.breakpointManager; + this._breakpointManager = self.Bindings.breakpointManager; this._breakpointManager.addEventListener(Bindings.BreakpointManager.Events.BreakpointAdded, this.update, this); this._breakpointManager.addEventListener(Bindings.BreakpointManager.Events.BreakpointRemoved, this.update, this); self.Common.settings.moduleSetting('breakpointsActive').addChangeListener(this.update, this); @@ -68,7 +68,7 @@ export class JavaScriptBreakpointsSidebarPane extends UI.ThrottledWidget { const details = UI.context.flavor(SDK.DebuggerPausedDetails); const selectedUILocation = details && details.callFrames.length ? - Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(details.callFrames[0].location()) : + self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(details.callFrames[0].location()) : null; let shouldShowView = false; diff --git a/front_end/sources/JavaScriptCompilerPlugin.js b/front_end/sources/JavaScriptCompilerPlugin.js index aefd0727bc..78ae0347e3 100644 --- a/front_end/sources/JavaScriptCompilerPlugin.js +++ b/front_end/sources/JavaScriptCompilerPlugin.js @@ -40,7 +40,7 @@ export class JavaScriptCompilerPlugin extends Plugin { return true; } for (const debuggerModel of self.SDK.targetManager.models(SDK.DebuggerModel)) { - if (Bindings.debuggerWorkspaceBinding.scriptFile(uiSourceCode, debuggerModel)) { + if (self.Bindings.debuggerWorkspaceBinding.scriptFile(uiSourceCode, debuggerModel)) { return true; } } @@ -64,7 +64,7 @@ export class JavaScriptCompilerPlugin extends Plugin { _findRuntimeModel() { const debuggerModels = self.SDK.targetManager.models(SDK.DebuggerModel); for (let i = 0; i < debuggerModels.length; ++i) { - const scriptFile = Bindings.debuggerWorkspaceBinding.scriptFile(this._uiSourceCode, debuggerModels[i]); + const scriptFile = self.Bindings.debuggerWorkspaceBinding.scriptFile(this._uiSourceCode, debuggerModels[i]); if (scriptFile) { return debuggerModels[i].runtimeModel(); } diff --git a/front_end/sources/ScriptOriginPlugin.js b/front_end/sources/ScriptOriginPlugin.js index a01194b5cc..a26d9d4565 100644 --- a/front_end/sources/ScriptOriginPlugin.js +++ b/front_end/sources/ScriptOriginPlugin.js @@ -49,7 +49,7 @@ export class ScriptOriginPlugin extends Plugin { * @return {!Promise} */ static async _script(uiSourceCode) { - const locations = await Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, 0, 0); + const locations = await self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, 0, 0); for (const location of locations) { const script = location.script(); if (script && script.originStackTrace) { diff --git a/front_end/sources/SourceMapNamesResolver.js b/front_end/sources/SourceMapNamesResolver.js index d59baf45ea..e359744334 100644 --- a/front_end/sources/SourceMapNamesResolver.js +++ b/front_end/sources/SourceMapNamesResolver.js @@ -93,7 +93,7 @@ export const resolveScope = function(scope) { } const script = scope.callFrame().script; - const sourceMap = Bindings.debuggerWorkspaceBinding.sourceMapForScript(script); + const sourceMap = self.Bindings.debuggerWorkspaceBinding.sourceMapForScript(script); if (!sourceMap) { return Promise.resolve(new Map()); } @@ -161,7 +161,7 @@ export const resolveScope = function(scope) { const sourceTextRange = new TextUtils.TextRange( startEntry.sourceLineNumber, startEntry.sourceColumnNumber, endEntry.sourceLineNumber, endEntry.sourceColumnNumber); - const uiSourceCode = Bindings.debuggerWorkspaceBinding.uiSourceCodeForSourceMapSourceURL( + const uiSourceCode = self.Bindings.debuggerWorkspaceBinding.uiSourceCodeForSourceMapSourceURL( script.debuggerModel, startEntry.sourceURL, script.isContentScript()); if (!uiSourceCode) { return Promise.resolve(/** @type {?string} */ (null)); @@ -271,8 +271,8 @@ export const resolveExpression = function( */ export const resolveExpressionAsync = async function(debuggerModel, uiSourceCode, lineNumber, startColumnNumber, endColumnNumber) { - const rawLocations = - await Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, lineNumber, startColumnNumber); + const rawLocations = await self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( + uiSourceCode, lineNumber, startColumnNumber); const rawLocation = rawLocations.find(location => location.debuggerModel === debuggerModel); if (!rawLocation) { return ''; @@ -282,7 +282,8 @@ export const resolveExpressionAsync = if (!script) { return ''; } - const sourceMap = /** @type {!SDK.TextSourceMap} */ (Bindings.debuggerWorkspaceBinding.sourceMapForScript(script)); + const sourceMap = + /** @type {!SDK.TextSourceMap} */ (self.Bindings.debuggerWorkspaceBinding.sourceMapForScript(script)); if (!sourceMap) { return ''; } diff --git a/front_end/sources/SourcesPanel.js b/front_end/sources/SourcesPanel.js index c95e8563c0..70eb8c828e 100644 --- a/front_end/sources/SourcesPanel.js +++ b/front_end/sources/SourcesPanel.js @@ -481,7 +481,7 @@ export class SourcesPanel extends UI.Panel { if (this._executionLineLocation) { this._executionLineLocation.dispose(); } - this._executionLineLocation = Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( + this._executionLineLocation = self.Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation( callFrame.location(), this._executionLineChanged.bind(this), this._liveLocationPool); } @@ -518,7 +518,8 @@ export class SourcesPanel extends UI.Panel { } const details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null; - await this._debuggerPausedMessage.render(details, Bindings.debuggerWorkspaceBinding, Bindings.breakpointManager); + await this._debuggerPausedMessage.render( + details, self.Bindings.debuggerWorkspaceBinding, self.Bindings.breakpointManager); if (details) { this._updateDebuggerButtonsAndStatusForTest(); } @@ -690,7 +691,7 @@ export class SourcesPanel extends UI.Panel { return; } // Always use 0 column. - const rawLocations = await Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( + const rawLocations = await self.Bindings.debuggerWorkspaceBinding.uiLocationToRawLocations( uiLocation.uiSourceCode, uiLocation.lineNumber, 0); const rawLocation = rawLocations.find(location => location.debuggerModel === executionContext.debuggerModel); if (rawLocation && this._prepareToResume()) { @@ -878,7 +879,7 @@ export class SourcesPanel extends UI.Panel { return; } - const uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(response.location); + const uiLocation = self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(response.location); if (uiLocation) { this.showUILocation(uiLocation); } @@ -1071,7 +1072,7 @@ export class DebuggerLocationRevealer { if (!(rawLocation instanceof SDK.DebuggerModel.Location)) { return Promise.reject(new Error('Internal error: not a debugger location')); } - const uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation); + const uiLocation = self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation); if (!uiLocation) { return Promise.resolve(); } diff --git a/front_end/sources_test_runner/DebuggerTestRunner.js b/front_end/sources_test_runner/DebuggerTestRunner.js index 234bf0cf66..340a206a2b 100644 --- a/front_end/sources_test_runner/DebuggerTestRunner.js +++ b/front_end/sources_test_runner/DebuggerTestRunner.js @@ -305,9 +305,9 @@ SourcesTestRunner.captureStackTraceIntoString = function(callFrames, asyncStackT const frame = callFrames[i]; const location = locationFunction.call(frame); const script = location.script(); - const uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location); + const uiLocation = self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location); const isFramework = - uiLocation ? Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode) : false; + uiLocation ? self.Bindings.blackboxManager.isBlackboxedUISourceCode(uiLocation.uiSourceCode) : false; if (options.dropFrameworkCallFrames && isFramework) { continue; @@ -513,7 +513,7 @@ SourcesTestRunner.waitBreakpointSidebarPane = function(waitUntilResolved) { return; } - for (const {breakpoint} of Bindings.breakpointManager.allBreakpointLocations()) { + for (const {breakpoint} of self.Bindings.breakpointManager.allBreakpointLocations()) { if (breakpoint._uiLocations.size === 0 && breakpoint.enabled()) { return SourcesTestRunner.waitBreakpointSidebarPane(); } @@ -733,7 +733,7 @@ SourcesTestRunner.waitDebuggerPluginBreakpoints = function(sourceFrame) { return SourcesTestRunner.waitDebuggerPluginDecorations().then(checkIfReady); function checkIfReady() { - for (const {breakpoint} of Bindings.breakpointManager.allBreakpointLocations()) { + for (const {breakpoint} of self.Bindings.breakpointManager.allBreakpointLocations()) { if (breakpoint._uiLocations.size === 0 && breakpoint.enabled()) { return SourcesTestRunner.waitDebuggerPluginDecorations().then(checkIfReady); } diff --git a/front_end/timeline/TimelineFlameChartDataProvider.js b/front_end/timeline/TimelineFlameChartDataProvider.js index e7761ead59..4a2a73040c 100644 --- a/front_end/timeline/TimelineFlameChartDataProvider.js +++ b/front_end/timeline/TimelineFlameChartDataProvider.js @@ -505,7 +505,7 @@ export class TimelineFlameChartDataProvider extends Common.Object { * @return {boolean} */ _isBlackboxedURL(url) { - return Bindings.blackboxManager.isBlackboxedURL(url); + return self.Bindings.blackboxManager.isBlackboxedURL(url); } /** diff --git a/front_end/timeline/TimelineFlameChartView.js b/front_end/timeline/TimelineFlameChartView.js index 124c193a8b..214c1c2d49 100644 --- a/front_end/timeline/TimelineFlameChartView.js +++ b/front_end/timeline/TimelineFlameChartView.js @@ -257,7 +257,7 @@ export class TimelineFlameChartView extends UI.VBox { willHide() { this._networkFlameChartGroupExpansionSetting.removeChangeListener(this.resizeToPreferredHeights, this); this._showMemoryGraphSetting.removeChangeListener(this._updateCountersGraphToggle, this); - Bindings.blackboxManager.removeChangeListener(this._boundRefresh); + self.Bindings.blackboxManager.removeChangeListener(this._boundRefresh); } /** @@ -266,7 +266,7 @@ export class TimelineFlameChartView extends UI.VBox { wasShown() { this._networkFlameChartGroupExpansionSetting.addChangeListener(this.resizeToPreferredHeights, this); this._showMemoryGraphSetting.addChangeListener(this._updateCountersGraphToggle, this); - Bindings.blackboxManager.addChangeListener(this._boundRefresh); + self.Bindings.blackboxManager.addChangeListener(this._boundRefresh); if (this._needsResizeToPreferredHeights) { this.resizeToPreferredHeights(); } diff --git a/front_end/timeline/TimelineUIUtils.js b/front_end/timeline/TimelineUIUtils.js index 0f2f27a502..58b1058ece 100644 --- a/front_end/timeline/TimelineUIUtils.js +++ b/front_end/timeline/TimelineUIUtils.js @@ -607,7 +607,7 @@ export class TimelineUIUtils { if (!rawLocation) { return null; } - const uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation); + const uiLocation = self.Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(rawLocation); return uiLocation ? uiLocation.linkText() : null; }