Changeset 142725 in webkit
- Timestamp:
- Feb 12, 2013 11:24:02 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142723 r142725 1 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Introduce version controller to migrate settings versions. 4 https://bugs.webkit.org/show_bug.cgi?id=109553 5 6 Reviewed by Yury Semikhatsky. 7 8 * inspector/version-controller-expected.txt: Added. 9 * inspector/version-controller.html: Added. 10 1 11 2013-02-12 Filip Pizlo <fpizlo@apple.com> 2 12 -
trunk/LayoutTests/inspector/version-controller-expected.txt
r142614 r142725 32 32 33 33 Running: testClearBreakpointsWhenTooMany 34 Starting test with 0 breakpoints .34 Starting test with 0 breakpoints and 500 allowed at max. 35 35 Number of breakpoints left in the setting after the test: 0. 36 36 37 Starting test with 1 breakpoints .37 Starting test with 1 breakpoints and 500 allowed at max. 38 38 Number of breakpoints left in the setting after the test: 1. 39 39 40 Starting test with 2 breakpoints .40 Starting test with 2 breakpoints and 500 allowed at max. 41 41 Number of breakpoints left in the setting after the test: 2. 42 42 43 Starting test with 499 999 breakpoints.44 Number of breakpoints left in the setting after the test: 499 999.43 Starting test with 499 breakpoints and 500 allowed at max. 44 Number of breakpoints left in the setting after the test: 499. 45 45 46 Starting test with 500 000 breakpoints.47 Number of breakpoints left in the setting after the test: 500 000.46 Starting test with 500 breakpoints and 500 allowed at max. 47 Number of breakpoints left in the setting after the test: 500. 48 48 49 Starting test with 50 0001 breakpoints.49 Starting test with 501 breakpoints and 500 allowed at max. 50 50 Number of breakpoints left in the setting after the test: 0. 51 51 52 Starting test with 1000 000 breakpoints.52 Starting test with 1000 breakpoints and 500 allowed at max. 53 53 Number of breakpoints left in the setting after the test: 0. 54 54 -
trunk/LayoutTests/inspector/version-controller.html
r142614 r142725 51 51 function testClearBreakpointsWhenTooMany(next) 52 52 { 53 function runClearBreakpointsTest(breakpointsCount )53 function runClearBreakpointsTest(breakpointsCount, maxBreakpointsCount) 54 54 { 55 InspectorTest.addResult("Starting test with " + breakpointsCount + " breakpoints .");55 InspectorTest.addResult("Starting test with " + breakpointsCount + " breakpoints and " + maxBreakpointsCount + " allowed at max."); 56 56 var versionController = new WebInspector.VersionController(); 57 57 var serializedBreakpoints = []; … … 59 59 serializedBreakpoints.push(createBreakpoint("file" + i + ".js", i % 10, "", true)); 60 60 var breakpointsSetting = new MockSetting(serializedBreakpoints); 61 versionController._clearBreakpointsWhenTooMany(breakpointsSetting );61 versionController._clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount); 62 62 InspectorTest.addResult("Number of breakpoints left in the setting after the test: " + breakpointsSetting.get().length + "."); 63 63 InspectorTest.addResult(""); 64 64 } 65 65 66 runClearBreakpointsTest(0 );67 runClearBreakpointsTest(1 );68 runClearBreakpointsTest(2 );69 runClearBreakpointsTest(499 999);70 runClearBreakpointsTest(500 000);71 runClearBreakpointsTest(50 0001);72 runClearBreakpointsTest(1000 000);66 runClearBreakpointsTest(0, 500); 67 runClearBreakpointsTest(1, 500); 68 runClearBreakpointsTest(2, 500); 69 runClearBreakpointsTest(499, 500); 70 runClearBreakpointsTest(500, 500); 71 runClearBreakpointsTest(501, 500); 72 runClearBreakpointsTest(1000, 500); 73 73 next(); 74 74 } -
trunk/Source/WebCore/ChangeLog
r142724 r142725 1 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Introduce version controller to migrate settings versions. 4 https://bugs.webkit.org/show_bug.cgi?id=109553 5 6 Reviewed by Yury Semikhatsky. 7 8 This patch introduces version controller that could be used to migrate inspector settings. 9 10 Test: inspector/version-controller.html 11 12 * inspector/front-end/Settings.js: 13 (WebInspector.Settings): 14 (WebInspector.VersionController): 15 (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion): 16 (WebInspector.VersionController.prototype._updateVersionFrom0To1): 17 * inspector/front-end/inspector.js: 18 1 19 2013-02-12 Martin Robinson <mrobinson@igalia.com> 2 20 -
trunk/Source/WebCore/inspector/front-end/Settings.js
r142614 r142725 382 382 _updateVersionFrom0To1: function() 383 383 { 384 this._clearBreakpointsWhenTooMany(WebInspector.settings.breakpoints );384 this._clearBreakpointsWhenTooMany(WebInspector.settings.breakpoints, 500000); 385 385 }, 386 386 387 387 /** 388 388 * @param {WebInspector.Setting} breakpointsSetting 389 */ 390 _clearBreakpointsWhenTooMany: function(breakpointsSetting) 389 * @param {number} maxBreakpointsCount 390 */ 391 _clearBreakpointsWhenTooMany: function(breakpointsSetting, maxBreakpointsCount) 391 392 { 392 393 // If there are too many breakpoints in a storage, it is likely due to a recent bug that caused 393 394 // periodical breakpoints duplication leading to inspector slowness. 394 if (breakpointsSetting.get().length > 500000)395 if (breakpointsSetting.get().length > maxBreakpointsCount) 395 396 breakpointsSetting.set([]); 396 397 }
Note: See TracChangeset
for help on using the changeset viewer.