⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 194360 in webkit


Ignore:
Timestamp:
Dec 21, 2015, 10:07:23 PM (11 years ago)
Author:
Nikita Vasilyev
Message:

WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
​https://bugs.webkit.org/show_bug.cgi?id=152471

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector._updateNewTabButtonState):
Don't use arrow functions because of ​https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r194356 r194360  
     12015-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
     4        https://bugs.webkit.org/show_bug.cgi?id=152471
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Base/Main.js:
     9        (WebInspector._updateNewTabButtonState):
     10        Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"
     11
    1122015-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r194322 r194360  
    491491    let allTabs = [...this._knownTabClassesByType.values()];
    492492    let addableTabs = allTabs.filter((tabClass) => !tabClass.isEphemeral());
    493     let canMakeNewTab = addableTabs.some((tabClass) => this.isNewTabWithTypeAllowed(tabClass.Type));
     493
     494    // FIXME: Use arrow functions once http://webkit.org/b/152497 is resolved.
     495    let canMakeNewTab = addableTabs.some(function(tabClass) {
     496        return this.isNewTabWithTypeAllowed(tabClass.Type);
     497    }.bind(this));
    494498    this.tabBar.newTabItem.disabled = !canMakeNewTab;
    495499};
Note: See TracChangeset for help on using the changeset viewer.