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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js b/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
index 0788d3d13e3a3353c42062fb44abe6462949a933..bd7efffe2ffc5c872ec0f4ba5927c3e06d0b0319 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
@@ -36,9 +36,9 @@
*/
WebInspector.ObjectPropertiesSection = function(object, title, linkifier, emptyPlaceholder, ignoreHasOwnProperty, extraProperties)
{
+ TreeOutlineInShadow.call(this);
this._object = object;
this._editable = true;
- TreeOutlineInShadow.call(this);
this.hideOverflow();
this.setFocusable(false);
this._objectTreeElement = new WebInspector.ObjectPropertiesSection.RootElement(object, linkifier, emptyPlaceholder, ignoreHasOwnProperty, extraProperties);
@@ -171,12 +171,14 @@ WebInspector.ObjectPropertiesSection.CompareProperties = function(propertyA, pro
*/
WebInspector.ObjectPropertiesSection.RootElement = function(object, linkifier, emptyPlaceholder, ignoreHasOwnProperty, extraProperties)
{
+ var contentElement = createElement("content");
+ TreeElement.call(this, contentElement);
+
this._object = object;
this._extraProperties = extraProperties || [];
this._ignoreHasOwnProperty = !!ignoreHasOwnProperty;
this._emptyPlaceholder = emptyPlaceholder;
- var contentElement = createElement("content");
- TreeElement.call(this, contentElement);
+
this.setExpandable(true);
this.selectable = false;
this.toggleOnClick = true;
@@ -246,10 +248,10 @@ WebInspector.ObjectPropertiesSection.RootElement.prototype = {
*/
WebInspector.ObjectPropertyTreeElement = function(property, linkifier)
{
- this.property = property;
-
// Pass an empty title, the title gets made later in onattach.
TreeElement.call(this);
+
+ this.property = property;
this.toggleOnClick = true;
this.selectable = false;
/** @type {!Array.<!Object>} */
@@ -1033,7 +1035,8 @@ WebInspector.ArrayGroupingTreeElement.prototype = {
*/
WebInspector.ObjectPropertyPrompt = function()
{
- WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.completionsForTextPromptInCurrentContext);
+ WebInspector.TextPrompt.call(this);
+ this.initialize(WebInspector.ExecutionContextSelector.completionsForTextPromptInCurrentContext);
this.setSuggestBoxEnabled(true);
};

Powered by Google App Engine
This is Rietveld 408576698