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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/Script.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 this.endLine = endLine; 52 this.endLine = endLine;
53 this.endColumn = endColumn; 53 this.endColumn = endColumn;
54 this._executionContextId = executionContextId; 54 this._executionContextId = executionContextId;
55 this.hash = hash; 55 this.hash = hash;
56 this._isContentScript = isContentScript; 56 this._isContentScript = isContentScript;
57 this._isLiveEdit = isLiveEdit; 57 this._isLiveEdit = isLiveEdit;
58 this.sourceMapURL = sourceMapURL; 58 this.sourceMapURL = sourceMapURL;
59 this.hasSourceURL = hasSourceURL; 59 this.hasSourceURL = hasSourceURL;
60 } 60 }
61 61
62 /** @enum {symbol} */
62 WebInspector.Script.Events = { 63 WebInspector.Script.Events = {
63 ScriptEdited: "ScriptEdited", 64 ScriptEdited: Symbol("ScriptEdited"),
64 SourceMapURLAdded: "SourceMapURLAdded" 65 SourceMapURLAdded: Symbol("SourceMapURLAdded")
65 } 66 }
66 67
67 WebInspector.Script.sourceURLRegex = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$ /m; 68 WebInspector.Script.sourceURLRegex = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$ /m;
68 69
69 /** 70 /**
70 * @param {string} source 71 * @param {string} source
71 * @return {string} 72 * @return {string}
72 */ 73 */
73 WebInspector.Script._trimSourceURLComment = function(source) 74 WebInspector.Script._trimSourceURLComment = function(source)
74 { 75 {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 { 334 {
334 if (error) 335 if (error)
335 console.error(error); 336 console.error(error);
336 fulfill(!error); 337 fulfill(!error);
337 } 338 }
338 } 339 }
339 }, 340 },
340 341
341 __proto__: WebInspector.SDKObject.prototype 342 __proto__: WebInspector.SDKObject.prototype
342 } 343 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698