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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined Created 4 years, 1 month 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.UISourceCodeFrame} 33 * @extends {WebInspector.UISourceCodeFrame}
34 * @param {!WebInspector.UISourceCode} uiSourceCode 34 * @param {!WebInspector.UISourceCode} uiSourceCode
35 */ 35 */
36 WebInspector.JavaScriptSourceFrame = function(uiSourceCode) 36 WebInspector.JavaScriptSourceFrame = function(uiSourceCode)
37 { 37 {
38 WebInspector.UISourceCodeFrame.call(this, uiSourceCode);
39
38 this._scriptsPanel = WebInspector.SourcesPanel.instance(); 40 this._scriptsPanel = WebInspector.SourcesPanel.instance();
39 this._breakpointManager = WebInspector.breakpointManager; 41 this._breakpointManager = WebInspector.breakpointManager;
40
41 WebInspector.UISourceCodeFrame.call(this, uiSourceCode);
42 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger) 42 if (uiSourceCode.project().type() === WebInspector.projectTypes.Debugger)
43 this.element.classList.add("source-frame-debugger-script"); 43 this.element.classList.add("source-frame-debugger-script");
44 44
45 this._popoverHelper = new WebInspector.ObjectPopoverHelper(this._scriptsPane l.element, 45 this._popoverHelper = new WebInspector.ObjectPopoverHelper(this._scriptsPane l.element,
46 this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(th is), this._onHidePopover.bind(this), true); 46 this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(th is), this._onHidePopover.bind(this), true);
47 this._popoverHelper.setTimeout(250, 250); 47 this._popoverHelper.setTimeout(250, 250);
48 48
49 this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(thi s), true); 49 this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(thi s), true);
50 50
51 this.textEditor.addEventListener(WebInspector.SourcesTextEditor.Events.Gutte rClick, this._handleGutterClick.bind(this), this); 51 this.textEditor.addEventListener(WebInspector.SourcesTextEditor.Events.Gutte rClick, this._handleGutterClick.bind(this), this);
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this); 1069 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this);
1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this); 1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this);
1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this); 1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this);
1072 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this); 1072 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this);
1073 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this); 1073 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this);
1074 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); 1074 WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
1075 }, 1075 },
1076 1076
1077 __proto__: WebInspector.UISourceCodeFrame.prototype 1077 __proto__: WebInspector.UISourceCodeFrame.prototype
1078 }; 1078 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698