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

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: 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 8de30ab9dc2540493b96bab0d36bd17b25d361d6..b0daa6338da3320f93523b0b1d1ee99c1ea078e7 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>} */
@@ -1029,7 +1031,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