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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/ViewportDataGrid.js

Issue 2573673002: DevTools: enable private field checks as a part of compilation. (Closed)
Patch Set: Created 4 years 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/ui_lazy/ViewportDataGrid.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/ViewportDataGrid.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/ViewportDataGrid.js
index adf618e7e7f409f8953b330c0271ab8ae7c1f906..960a64a2f8cf666d74819006b93a15a4ecc8eb64 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/ViewportDataGrid.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/ViewportDataGrid.js
@@ -306,18 +306,13 @@ UI.ViewportDataGridNode = class extends UI.DataGridNode {
* @return {!Element}
*/
element() {
- if (!this._element) {
- this.createElement();
- this.createCells();
+ var hadElement = !!this._element;
+ var element = this.createElement();
alph 2016/12/12 23:41:37 You don't need to create an element if there's alr
+ if (!hadElement || this._stale) {
+ this.createCells(element);
this._stale = false;
}
-
- if (this._stale) {
- this.createCells();
- this._stale = false;
- }
-
- return /** @type {!Element} */ (this._element);
+ return element;
}
/**

Powered by Google App Engine
This is Rietveld 408576698