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

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

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 this._uiSourceCode = uiSourceCode; 289 this._uiSourceCode = uiSourceCode;
290 this._uiSourceCode.forceLoadOnCheckContent(); 290 this._uiSourceCode.forceLoadOnCheckContent();
291 291
292 if (this._uiSourceCode.contentType().isScript()) 292 if (this._uiSourceCode.contentType().isScript())
293 this._script = scripts[0]; 293 this._script = scripts[0];
294 294
295 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyChanged, this._workingCopyChanged, this); 295 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyChanged, this._workingCopyChanged, this);
296 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyCommitted, this._workingCopyCommitted, this); 296 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyCommitted, this._workingCopyCommitted, this);
297 } 297 }
298 298
299 /** @enum {symbol} */
299 WebInspector.ResourceScriptFile.Events = { 300 WebInspector.ResourceScriptFile.Events = {
300 DidMergeToVM: "DidMergeToVM", 301 DidMergeToVM: Symbol("DidMergeToVM"),
301 DidDivergeFromVM: "DidDivergeFromVM", 302 DidDivergeFromVM: Symbol("DidDivergeFromVM"),
302 } 303 }
303 304
304 WebInspector.ResourceScriptFile.prototype = { 305 WebInspector.ResourceScriptFile.prototype = {
305 /** 306 /**
306 * @param {!Array.<!WebInspector.Script>} scripts 307 * @param {!Array.<!WebInspector.Script>} scripts
307 * @return {boolean} 308 * @return {boolean}
308 */ 309 */
309 _hasScripts: function(scripts) 310 _hasScripts: function(scripts)
310 { 311 {
311 return this._script && this._script === scripts[0]; 312 return this._script && this._script === scripts[0];
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 /** 482 /**
482 * @return {boolean} 483 * @return {boolean}
483 */ 484 */
484 hasSourceMapURL: function() 485 hasSourceMapURL: function()
485 { 486 {
486 return this._script && !!this._script.sourceMapURL; 487 return this._script && !!this._script.sourceMapURL;
487 }, 488 },
488 489
489 __proto__: WebInspector.Object.prototype 490 __proto__: WebInspector.Object.prototype
490 } 491 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698