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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/common/Settings.js

Issue 1666573002: [DevTools] Polyfill Object.observe for old frontends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/devtools.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 get: function() 259 get: function()
260 { 260 {
261 if (typeof this._value !== "undefined") 261 if (typeof this._value !== "undefined")
262 return this._value; 262 return this._value;
263 263
264 this._value = this._defaultValue; 264 this._value = this._defaultValue;
265 if (this._storage.has(this._name)) { 265 if (this._storage.has(this._name)) {
266 try { 266 try {
267 this._value = JSON.parse(this._storage.get(this._name)); 267 this._value = JSON.parse(this._storage.get(this._name));
268 } catch(e) { 268 } catch(e) {
269 this.remove(); 269 this._storage.remove(this._name);
270 } 270 }
271 } 271 }
272 return this._value; 272 return this._value;
273 }, 273 },
274 274
275 /** 275 /**
276 * @param {V} value 276 * @param {V} value
277 */ 277 */
278 set: function(value) 278 set: function(value)
279 { 279 {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 747
748 /** 748 /**
749 * @param {string} settingName 749 * @param {string} settingName
750 * @return {!WebInspector.Setting} 750 * @return {!WebInspector.Setting}
751 */ 751 */
752 WebInspector.settingForTest = function(settingName) 752 WebInspector.settingForTest = function(settingName)
753 { 753 {
754 return WebInspector.settings.settingForTest(settingName); 754 return WebInspector.settings.settingForTest(settingName);
755 } 755 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698