2 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 maxInlineTextChildLength: 80,
36 applicationTitle: "Developer Tools - %s"
40 isMainFrontend: false,
41 canProfilePower: false,
47 WebInspector.Settings = function()
49 this._eventSupport = new WebInspector.Object();
50 this._registry = /** @type {!Object.<string, !WebInspector.Setting>} */ ({});
52 this.colorFormat = this.createSetting("colorFormat", "original");
53 this.consoleHistory = this.createSetting("consoleHistory", []);
54 this.domWordWrap = this.createSetting("domWordWrap", true);
55 this.eventListenersFilter = this.createSetting("eventListenersFilter", "all");
56 this.lastViewedScriptFile = this.createSetting("lastViewedScriptFile", "application");
57 this.monitoringXHREnabled = this.createSetting("monitoringXHREnabled", false);
58 this.preserveConsoleLog = this.createSetting("preserveConsoleLog", false);
59 this.consoleTimestampsEnabled = this.createSetting("consoleTimestampsEnabled", false);
60 this.resourcesLargeRows = this.createSetting("resourcesLargeRows", true);
61 this.resourcesSortOptions = this.createSetting("resourcesSortOptions", {timeOption: "responseTime", sizeOption: "transferSize"});
62 this.resourceViewTab = this.createSetting("resourceViewTab", "preview");
63 this.showInheritedComputedStyleProperties = this.createSetting("showInheritedComputedStyleProperties", false);
64 this.showUserAgentStyles = this.createSetting("showUserAgentStyles", true);
65 this.watchExpressions = this.createSetting("watchExpressions", []);
66 this.breakpoints = this.createSetting("breakpoints", []);
67 this.eventListenerBreakpoints = this.createSetting("eventListenerBreakpoints", []);
68 this.domBreakpoints = this.createSetting("domBreakpoints", []);
69 this.xhrBreakpoints = this.createSetting("xhrBreakpoints", []);
70 this.jsSourceMapsEnabled = this.createSetting("sourceMapsEnabled", true);
71 this.cssSourceMapsEnabled = this.createSetting("cssSourceMapsEnabled", true);
72 this.cacheDisabled = this.createSetting("cacheDisabled", false);
73 this.showUAShadowDOM = this.createSetting("showUAShadowDOM", false);
74 this.savedURLs = this.createSetting("savedURLs", {});
75 this.javaScriptDisabled = this.createSetting("javaScriptDisabled", false);
76 this.showAdvancedHeapSnapshotProperties = this.createSetting("showAdvancedHeapSnapshotProperties", false);
77 this.highResolutionCpuProfiling = this.createSetting("highResolutionCpuProfiling", false);
78 this.searchInContentScripts = this.createSetting("searchInContentScripts", false);
79 this.textEditorIndent = this.createSetting("textEditorIndent", " ");
80 this.textEditorAutoDetectIndent = this.createSetting("textEditorAutoIndentIndent", true);
81 this.textEditorAutocompletion = this.createSetting("textEditorAutocompletion", true);
82 this.textEditorBracketMatching = this.createSetting("textEditorBracketMatching", true);
83 this.cssReloadEnabled = this.createSetting("cssReloadEnabled", false);
84 this.timelineLiveUpdate = this.createSetting("timelineLiveUpdate", true);
85 this.showMetricsRulers = this.createSetting("showMetricsRulers", false);
86 this.workerInspectorWidth = this.createSetting("workerInspectorWidth", 600);
87 this.workerInspectorHeight = this.createSetting("workerInspectorHeight", 600);
88 this.messageURLFilters = this.createSetting("messageURLFilters", {});
89 this.networkHideDataURL = this.createSetting("networkHideDataURL", false);
90 this.networkResourceTypeFilters = this.createSetting("networkResourceTypeFilters", {});
91 this.messageLevelFilters = this.createSetting("messageLevelFilters", {});
92 this.splitVerticallyWhenDockedToRight = this.createSetting("splitVerticallyWhenDockedToRight", true);
93 this.visiblePanels = this.createSetting("visiblePanels", {});
94 this.shortcutPanelSwitch = this.createSetting("shortcutPanelSwitch", false);
95 this.showWhitespacesInEditor = this.createSetting("showWhitespacesInEditor", false);
96 this.skipStackFramesSwitch = this.createSetting("skipStackFramesSwitch", false);
97 this.skipStackFramesPattern = this.createRegExpSetting("skipStackFramesPattern", "");
98 this.pauseOnExceptionEnabled = this.createSetting("pauseOnExceptionEnabled", false);
99 this.pauseOnCaughtException = this.createSetting("pauseOnCaughtException", false);
100 this.enableAsyncStackTraces = this.createSetting("enableAsyncStackTraces", false);
103 WebInspector.Settings.prototype = {
105 * @param {string} key
106 * @param {*} defaultValue
107 * @return {!WebInspector.Setting}
109 createSetting: function(key, defaultValue)
111 if (!this._registry[key])
112 this._registry[key] = new WebInspector.Setting(key, defaultValue, this._eventSupport, window.localStorage);
113 return this._registry[key];
117 * @param {string} key
118 * @param {string} defaultValue
119 * @param {string=} regexFlags
120 * @return {!WebInspector.Setting}
122 createRegExpSetting: function(key, defaultValue, regexFlags)
124 if (!this._registry[key])
125 this._registry[key] = new WebInspector.RegExpSetting(key, defaultValue, this._eventSupport, window.localStorage, regexFlags);
126 return this._registry[key];
130 * @param {string} key
131 * @param {*} defaultValue
132 * @param {function(*, function(string, ...))} setterCallback
133 * @return {!WebInspector.Setting}
135 createBackendSetting: function(key, defaultValue, setterCallback)
137 if (!this._registry[key])
138 this._registry[key] = new WebInspector.BackendSetting(key, defaultValue, this._eventSupport, window.localStorage, setterCallback);
139 return this._registry[key];
142 initializeBackendSettings: function()
144 this.showPaintRects = WebInspector.settings.createBackendSetting("showPaintRects", false, PageAgent.setShowPaintRects.bind(PageAgent));
145 this.showDebugBorders = WebInspector.settings.createBackendSetting("showDebugBorders", false, PageAgent.setShowDebugBorders.bind(PageAgent));
146 this.continuousPainting = WebInspector.settings.createBackendSetting("continuousPainting", false, PageAgent.setContinuousPaintingEnabled.bind(PageAgent));
147 this.showFPSCounter = WebInspector.settings.createBackendSetting("showFPSCounter", false, PageAgent.setShowFPSCounter.bind(PageAgent));
148 this.showScrollBottleneckRects = WebInspector.settings.createBackendSetting("showScrollBottleneckRects", false, PageAgent.setShowScrollBottleneckRects.bind(PageAgent));
154 * @param {string} name
155 * @param {V} defaultValue
156 * @param {!WebInspector.Object} eventSupport
157 * @param {?Storage} storage
160 WebInspector.Setting = function(name, defaultValue, eventSupport, storage)
163 this._defaultValue = defaultValue;
164 this._eventSupport = eventSupport;
165 this._storage = storage;
168 WebInspector.Setting.prototype = {
170 * @param {function(!WebInspector.Event)} listener
171 * @param {!Object=} thisObject
173 addChangeListener: function(listener, thisObject)
175 this._eventSupport.addEventListener(this._name, listener, thisObject);
179 * @param {function(!WebInspector.Event)} listener
180 * @param {!Object=} thisObject
182 removeChangeListener: function(listener, thisObject)
184 this._eventSupport.removeEventListener(this._name, listener, thisObject);
197 if (typeof this._value !== "undefined")
200 this._value = this._defaultValue;
201 if (this._storage && this._name in this._storage) {
203 this._value = JSON.parse(this._storage[this._name]);
205 delete this._storage[this._name];
216 this._storage[this._name] = JSON.stringify(value);
218 console.error("Error saving setting with name:" + this._name);
221 this._eventSupport.dispatchEventToListeners(this._name, value);
227 * @extends {WebInspector.Setting}
228 * @param {string} name
229 * @param {string} defaultValue
230 * @param {!WebInspector.Object} eventSupport
231 * @param {?Storage} storage
232 * @param {string=} regexFlags
234 WebInspector.RegExpSetting = function(name, defaultValue, eventSupport, storage, regexFlags)
236 WebInspector.Setting.call(this, name, defaultValue, eventSupport, storage);
237 this._regexFlags = regexFlags;
240 WebInspector.RegExpSetting.prototype = {
244 WebInspector.Setting.prototype.set.call(this, value);
252 if (typeof this._regex !== "undefined")
256 this._regex = new RegExp(this.get(), this._regexFlags || "");
262 __proto__: WebInspector.Setting.prototype
267 * @extends {WebInspector.Setting}
268 * @param {string} name
269 * @param {*} defaultValue
270 * @param {!WebInspector.Object} eventSupport
271 * @param {?Storage} storage
272 * @param {function(*,function(string, ...))} setterCallback
274 WebInspector.BackendSetting = function(name, defaultValue, eventSupport, storage, setterCallback)
276 WebInspector.Setting.call(this, name, defaultValue, eventSupport, storage);
277 this._setterCallback = setterCallback;
278 var currentValue = this.get();
279 if (currentValue !== defaultValue)
280 this.set(currentValue);
283 WebInspector.BackendSetting.prototype = {
287 * @param {?Protocol.Error} error
288 * @this {WebInspector.BackendSetting}
290 function callback(error)
293 WebInspector.console.log("Error applying setting " + this._name + ": " + error);
294 this._eventSupport.dispatchEventToListeners(this._name, this._value);
297 WebInspector.Setting.prototype.set.call(this, value);
299 this._setterCallback(value, callback.bind(this));
302 __proto__: WebInspector.Setting.prototype
307 * @param {boolean} experimentsEnabled
309 WebInspector.ExperimentsSettings = function(experimentsEnabled)
311 this._experimentsEnabled = experimentsEnabled;
312 this._setting = WebInspector.settings.createSetting("experiments", {});
313 this._experiments = [];
314 this._enabledForTest = {};
316 // Add currently running experiments here.
317 this.fileSystemInspection = this._createExperiment("fileSystemInspection", "FileSystem inspection");
318 this.canvasInspection = this._createExperiment("canvasInspection ", "Canvas inspection");
319 this.frameworksDebuggingSupport = this._createExperiment("frameworksDebuggingSupport", "Enable frameworks debugging support");
320 this.layersPanel = this._createExperiment("layersPanel", "Show Layers panel");
321 this.showEditorInDrawer = this._createExperiment("showEditorInDrawer", "Show editor in drawer");
322 this.gpuTimeline = this._createExperiment("gpuTimeline", "Show GPU data on timeline");
323 this.applyCustomStylesheet = this._createExperiment("applyCustomStylesheet", "Allow custom UI themes");
324 this.workersInMainWindow = this._createExperiment("workersInMainWindow", "Show workers in main window");
325 this.dockToLeft = this._createExperiment("dockToLeft", "Enable dock to left mode");
326 this.allocationProfiler = this._createExperiment("allocationProfiler", "Enable JavaScript heap allocation profiler");
327 this.heapSnapshotStatistics = this._createExperiment("heapSnapshotStatistics", "Show memory breakdown statistics in heap snapshots");
328 this.timelineNoLiveUpdate = this._createExperiment("timelineNoLiveUpdate", "Timeline w/o live update");
329 this.powerProfiler = this._createExperiment("powerProfiler", "Enable power mode in Timeline");
330 this.timelineFlameChart = this._createExperiment("timelineFlameChart", "Enable FlameChart mode in Timeline");
331 this.timelineOnTraceEvents = this._createExperiment("timelineOnTraceEvents", "Use trace events as Timeline backend");
332 this.timelineTracingMode = this._createExperiment("timelineTracingMode", "Enable Tracing mode in Timeline");
333 this.devicesPanel = this._createExperiment("devicesPanel", "Show devices in drawer");
334 this.timelineJSCPUProfile = this._createExperiment("timelineJSCPUProfile", "Collect JavaScript CPU profile while recording timeline");
336 this._cleanUpSetting();
339 WebInspector.ExperimentsSettings.prototype = {
341 * @return {!Array.<!WebInspector.Experiment>}
345 return this._experiments.slice();
351 get experimentsEnabled()
353 return this._experimentsEnabled;
357 * @param {string} experimentName
358 * @param {string} experimentTitle
359 * @return {!WebInspector.Experiment}
361 _createExperiment: function(experimentName, experimentTitle)
363 var experiment = new WebInspector.Experiment(this, experimentName, experimentTitle);
364 this._experiments.push(experiment);
369 * @param {string} experimentName
372 isEnabled: function(experimentName)
374 if (this._enabledForTest[experimentName])
377 if (!this.experimentsEnabled)
380 var experimentsSetting = this._setting.get();
381 return experimentsSetting[experimentName];
385 * @param {string} experimentName
386 * @param {boolean} enabled
388 setEnabled: function(experimentName, enabled)
390 var experimentsSetting = this._setting.get();
391 experimentsSetting[experimentName] = enabled;
392 this._setting.set(experimentsSetting);
396 * @param {string} experimentName
398 _enableForTest: function(experimentName)
400 this._enabledForTest[experimentName] = true;
403 _cleanUpSetting: function()
405 var experimentsSetting = this._setting.get();
406 var cleanedUpExperimentSetting = {};
407 for (var i = 0; i < this._experiments.length; ++i) {
408 var experimentName = this._experiments[i].name;
409 if (experimentsSetting[experimentName])
410 cleanedUpExperimentSetting[experimentName] = true;
412 this._setting.set(cleanedUpExperimentSetting);
418 * @param {!WebInspector.ExperimentsSettings} experimentsSettings
419 * @param {string} name
420 * @param {string} title
422 WebInspector.Experiment = function(experimentsSettings, name, title)
426 this._experimentsSettings = experimentsSettings;
429 WebInspector.Experiment.prototype = {
449 isEnabled: function()
451 return this._experimentsSettings.isEnabled(this._name);
455 * @param {boolean} enabled
457 setEnabled: function(enabled)
459 this._experimentsSettings.setEnabled(this._name, enabled);
462 enableForTest: function()
464 this._experimentsSettings._enableForTest(this._name);
471 WebInspector.VersionController = function()
475 WebInspector.VersionController.currentVersion = 8;
477 WebInspector.VersionController.prototype = {
478 updateVersion: function()
480 var versionSetting = WebInspector.settings.createSetting("inspectorVersion", 0);
481 var currentVersion = WebInspector.VersionController.currentVersion;
482 var oldVersion = versionSetting.get();
483 var methodsToRun = this._methodsToRunToUpdateVersion(oldVersion, currentVersion);
484 for (var i = 0; i < methodsToRun.length; ++i)
485 this[methodsToRun[i]].call(this);
486 versionSetting.set(currentVersion);
490 * @param {number} oldVersion
491 * @param {number} currentVersion
493 _methodsToRunToUpdateVersion: function(oldVersion, currentVersion)
496 for (var i = oldVersion; i < currentVersion; ++i)
497 result.push("_updateVersionFrom" + i + "To" + (i + 1));
501 _updateVersionFrom0To1: function()
503 this._clearBreakpointsWhenTooMany(WebInspector.settings.breakpoints, 500000);
506 _updateVersionFrom1To2: function()
508 var versionSetting = WebInspector.settings.createSetting("previouslyViewedFiles", []);
509 versionSetting.set([]);
512 _updateVersionFrom2To3: function()
514 var fileSystemMappingSetting = WebInspector.settings.createSetting("fileSystemMapping", {});
515 fileSystemMappingSetting.set({});
516 if (window.localStorage)
517 delete window.localStorage["fileMappingEntries"];
520 _updateVersionFrom3To4: function()
522 var advancedMode = WebInspector.settings.createSetting("showHeaSnapshotObjectsHiddenProperties", false).get();
523 WebInspector.settings.showAdvancedHeapSnapshotProperties.set(advancedMode);
526 _updateVersionFrom4To5: function()
528 if (!window.localStorage)
531 "FileSystemViewSidebarWidth": "fileSystemViewSplitViewState",
532 "canvasProfileViewReplaySplitLocation": "canvasProfileViewReplaySplitViewState",
533 "canvasProfileViewSplitLocation": "canvasProfileViewSplitViewState",
534 "elementsSidebarWidth": "elementsPanelSplitViewState",
535 "StylesPaneSplitRatio": "stylesPaneSplitViewState",
536 "heapSnapshotRetainersViewSize": "heapSnapshotSplitViewState",
537 "InspectorView.splitView": "InspectorView.splitViewState",
538 "InspectorView.screencastSplitView": "InspectorView.screencastSplitViewState",
539 "Inspector.drawerSplitView": "Inspector.drawerSplitViewState",
540 "layerDetailsSplitView": "layerDetailsSplitViewState",
541 "networkSidebarWidth": "networkPanelSplitViewState",
542 "sourcesSidebarWidth": "sourcesPanelSplitViewState",
543 "scriptsPanelNavigatorSidebarWidth": "sourcesPanelNavigatorSplitViewState",
544 "sourcesPanelSplitSidebarRatio": "sourcesPanelDebuggerSidebarSplitViewState",
545 "timeline-details": "timelinePanelDetailsSplitViewState",
546 "timeline-split": "timelinePanelRecorsSplitViewState",
547 "timeline-view": "timelinePanelTimelineStackSplitViewState",
548 "auditsSidebarWidth": "auditsPanelSplitViewState",
549 "layersSidebarWidth": "layersPanelSplitViewState",
550 "profilesSidebarWidth": "profilesPanelSplitViewState",
551 "resourcesSidebarWidth": "resourcesPanelSplitViewState"
553 for (var oldName in settingNames) {
554 var newName = settingNames[oldName];
555 var oldNameH = oldName + "H";
558 var oldSetting = WebInspector.settings.createSetting(oldName, undefined).get();
560 newValue = newValue || {};
561 newValue.vertical = {};
562 newValue.vertical.size = oldSetting;
563 delete window.localStorage[oldName];
565 var oldSettingH = WebInspector.settings.createSetting(oldNameH, undefined).get();
567 newValue = newValue || {};
568 newValue.horizontal = {};
569 newValue.horizontal.size = oldSettingH;
570 delete window.localStorage[oldNameH];
572 var newSetting = WebInspector.settings.createSetting(newName, {});
574 newSetting.set(newValue);
578 _updateVersionFrom5To6: function()
580 if (!window.localStorage)
584 "debuggerSidebarHidden": "sourcesPanelSplitViewState",
585 "navigatorHidden": "sourcesPanelNavigatorSplitViewState",
586 "WebInspector.Drawer.showOnLoad": "Inspector.drawerSplitViewState"
589 for (var oldName in settingNames) {
590 var newName = settingNames[oldName];
592 var oldSetting = WebInspector.settings.createSetting(oldName, undefined).get();
593 var invert = "WebInspector.Drawer.showOnLoad" === oldName;
594 var hidden = !!oldSetting !== invert;
595 delete window.localStorage[oldName];
596 var showMode = hidden ? "OnlyMain" : "Both";
598 var newSetting = WebInspector.settings.createSetting(newName, null);
599 var newValue = newSetting.get() || {};
600 newValue.vertical = newValue.vertical || {};
601 newValue.vertical.showMode = showMode;
602 newValue.horizontal = newValue.horizontal || {};
603 newValue.horizontal.showMode = showMode;
604 newSetting.set(newValue);
608 _updateVersionFrom6To7: function()
610 if (!window.localStorage)
614 "sourcesPanelNavigatorSplitViewState": "sourcesPanelNavigatorSplitViewState",
615 "elementsPanelSplitViewState": "elementsPanelSplitViewState",
616 "canvasProfileViewReplaySplitViewState": "canvasProfileViewReplaySplitViewState",
617 "editorInDrawerSplitViewState": "editorInDrawerSplitViewState",
618 "stylesPaneSplitViewState": "stylesPaneSplitViewState",
619 "sourcesPanelDebuggerSidebarSplitViewState": "sourcesPanelDebuggerSidebarSplitViewState"
622 for (var name in settingNames) {
623 if (!(name in window.localStorage))
625 var setting = WebInspector.settings.createSetting(name, undefined);
626 var value = setting.get();
629 // Zero out saved percentage sizes, and they will be restored to defaults.
630 if (value.vertical && value.vertical.size && value.vertical.size < 1)
631 value.vertical.size = 0;
632 if (value.horizontal && value.horizontal.size && value.horizontal.size < 1)
633 value.horizontal.size = 0;
638 _updateVersionFrom7To8: function()
640 var settingName = "deviceMetrics";
641 if (!window.localStorage || !(settingName in window.localStorage))
643 var setting = WebInspector.settings.createSetting(settingName, undefined);
644 var value = setting.get();
648 var components = value.split("x");
649 if (components.length >= 3) {
650 var width = parseInt(components[0], 10);
651 var height = parseInt(components[1], 10);
652 var deviceScaleFactor = parseFloat(components[2]);
653 if (deviceScaleFactor) {
654 components[0] = "" + Math.round(width / deviceScaleFactor);
655 components[1] = "" + Math.round(height / deviceScaleFactor);
658 value = components.join("x");
663 * @param {!WebInspector.Setting} breakpointsSetting
664 * @param {number} maxBreakpointsCount
666 _clearBreakpointsWhenTooMany: function(breakpointsSetting, maxBreakpointsCount)
668 // If there are too many breakpoints in a storage, it is likely due to a recent bug that caused
669 // periodical breakpoints duplication leading to inspector slowness.
670 if (breakpointsSetting.get().length > maxBreakpointsCount)
671 breakpointsSetting.set([]);
675 WebInspector.settings = new WebInspector.Settings();
676 WebInspector.experimentsSettings = new WebInspector.ExperimentsSettings(WebInspector.queryParam("experiments") !== null);
678 // These methods are added for backwards compatibility with Devtools CodeSchool extension.
684 WebInspector.PauseOnExceptionStateSetting = function()
686 WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._enabledChanged, this);
687 WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOnCaughtChanged, this);
688 this._name = "pauseOnExceptionStateString";
689 this._eventSupport = new WebInspector.Object();
690 this._value = this._calculateValue();
693 WebInspector.PauseOnExceptionStateSetting.prototype = {
695 * @param {function(!WebInspector.Event)} listener
696 * @param {!Object=} thisObject
698 addChangeListener: function(listener, thisObject)
700 this._eventSupport.addEventListener(this._name, listener, thisObject);
704 * @param {function(!WebInspector.Event)} listener
705 * @param {!Object=} thisObject
707 removeChangeListener: function(listener, thisObject)
709 this._eventSupport.removeEventListener(this._name, listener, thisObject);
723 _calculateValue: function()
725 if (!WebInspector.settings.pauseOnExceptionEnabled.get())
727 // The correct code here would be
728 // return WebInspector.settings.pauseOnCaughtException.get() ? "all" : "uncaught";
729 // But the CodeSchool DevTools relies on the fact that we used to enable pausing on ALL extensions by default, so we trick it here.
733 _enabledChanged: function(event)
735 this._fireChangedIfNeeded();
738 _pauseOnCaughtChanged: function(event)
740 this._fireChangedIfNeeded();
743 _fireChangedIfNeeded: function()
745 var newValue = this._calculateValue();
746 if (newValue === this._value)
748 this._value = newValue;
749 this._eventSupport.dispatchEventToListeners(this._name, this._value);
753 WebInspector.settings.pauseOnExceptionStateString = new WebInspector.PauseOnExceptionStateSetting();