Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js

Issue 2931143003: DevTools: make debugger's rawLocationToUILocation return nullable type (Closed)
Patch Set: add test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 this._uiLocations.set(location.id(), uiLocation); 916 this._uiLocations.set(location.id(), uiLocation);
917 this._breakpoint._replaceUILocation(oldUILocation, uiLocation); 917 this._breakpoint._replaceUILocation(oldUILocation, uiLocation);
918 } 918 }
919 919
920 /** 920 /**
921 * @param {!SDK.DebuggerModel.Location} location 921 * @param {!SDK.DebuggerModel.Location} location
922 * @return {boolean} 922 * @return {boolean}
923 */ 923 */
924 _addResolvedLocation(location) { 924 _addResolvedLocation(location) {
925 var uiLocation = this._debuggerWorkspaceBinding.rawLocationToUILocation(loca tion); 925 var uiLocation = this._debuggerWorkspaceBinding.rawLocationToUILocation(loca tion);
926 if (!uiLocation)
927 return false;
926 var breakpoint = this._breakpoint._breakpointManager.findBreakpoint( 928 var breakpoint = this._breakpoint._breakpointManager.findBreakpoint(
927 uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber) ; 929 uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber) ;
928 if (breakpoint && breakpoint !== this._breakpoint) { 930 if (breakpoint && breakpoint !== this._breakpoint) {
929 // location clash 931 // location clash
930 this._breakpoint.remove(); 932 this._breakpoint.remove();
931 return false; 933 return false;
932 } 934 }
933 this._debuggerWorkspaceBinding.createLiveLocation( 935 this._debuggerWorkspaceBinding.createLiveLocation(
934 location, this._locationUpdated.bind(this, location), this._liveLocation s); 936 location, this._locationUpdated.bind(this, location), this._liveLocation s);
935 return true; 937 return true;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 this.url = breakpoint._url; 1074 this.url = breakpoint._url;
1073 this.lineNumber = breakpoint.lineNumber(); 1075 this.lineNumber = breakpoint.lineNumber();
1074 this.columnNumber = breakpoint.columnNumber(); 1076 this.columnNumber = breakpoint.columnNumber();
1075 this.condition = breakpoint.condition(); 1077 this.condition = breakpoint.condition();
1076 this.enabled = breakpoint.enabled(); 1078 this.enabled = breakpoint.enabled();
1077 } 1079 }
1078 }; 1080 };
1079 1081
1080 /** @type {!Bindings.BreakpointManager} */ 1082 /** @type {!Bindings.BreakpointManager} */
1081 Bindings.breakpointManager; 1083 Bindings.breakpointManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698