Changeset 182142 in webkit


Ignore:
Timestamp:
Mar 30, 2015 9:29:18 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Add more ESLint rules that reflect the current state of the code base
https://bugs.webkit.org/show_bug.cgi?id=143212

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-03-30
Reviewed by Timothy Hatcher.

  • .eslintrc:

Define some utilities as globals.
Replace "no-comma-dangle" with "comma-dangle". "no-comma-dangle" is deprecated and does not trigger in ESLint v.0.17.1
Set "new-cap" to 0 due to the usage of "WebInspector.UIString".
Disable "no-redeclare" for now and enable it back as soon as block scoped let is used.
Disable "dot-notation", "no-shadow" and "no-use-before-define" due to a lot of hits.
Disable "no-inner-declarations" as this is a common pattern to save memory.

  • UserInterface/Views/ObjectTreePropertyTreeElement.js:
  • UserInterface/Models/SourceCodeLocation.js:

It's not necessary to initialize x to undefined.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:
  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
  • UserInterface/Views/TextEditor.js:
  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

Remove unused variable x.

  • UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
  • UserInterface/Models/PropertyPath.js:
  • UserInterface/Views/RadioButtonNavigationItem.js:
  • UserInterface/Views/ReplayDashboardView.js:
  • UserInterface/Models/ScriptSyntaxTree.js:
  • UserInterface/Views/SourceCodeTextEditor.js:
  • UserInterface/Views/SourceCodeTreeElement.js:

Remove trailing and unexpected whitespace.

  • UserInterface/Views/ProbeSetDataGrid.js:
  • UserInterface/Views/TimelineRuler.js:

Add missing semicolon.

  • UserInterface/Views/TimelineDataGrid.js:
  • UserInterface/Views/TimelineRecordFrame.js:

Add missing var statement.

  • UserInterface/Views/TypeTokenView.js:

Remove unnecessary bind.

Location:
trunk/Source/WebInspectorUI
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/.eslintrc

    r181987 r182142  
    4141        "DebuggerAgent": true,
    4242        "Formatter": true,
     43        "FormatterContentBuilder": true,
    4344        "IndexedDBAgent": true,
    4445        "InspectorAgent": true,
     
    5455        "TimelineAgent": true,
    5556        "WebInspector": true,
     57        "WebKitPoint": true,
    5658        "WorkerAgent": true,
    5759        "console": true,
     60        // utilities
     61        "clamp": true,
     62        "isEnterKey": true,
     63        "isEmptyObject": true,
     64        "insertionIndexForObjectInListSortedByFunction": true,
     65        "isFunctionStringNativeCode": true,
     66        "parseMIMEType": true,
     67        "doubleQuotedString": true,
     68        // image utilities
     69        "platformImagePath": true,
     70        "wrappedSVGDocument": true,
     71        // url utilities
     72        "absoluteURL": true,
     73        "parseQueryString": true,
     74        "parseURL": true,
     75        "parseSecurityOrigin": true,
     76        "removeURLFragment": true,
     77        // externals
     78        "esprima": true,
    5879    },
    5980    "rules": {
    6081        "consistent-return": 2,
    6182        "curly": 0,
     83        "comma-dangle": 0,
     84        "dot-notation": 0,
    6285        "eqeqeq": 2,
     86        "new-cap": 0,
    6387        "new-parens": 0,
    64         "no-comma-dangle": 0,
    6588        "no-console": 0,
    6689        "no-constant-condition": 0,
    6790        "no-extra-bind": 2,
    6891        "no-extra-semi": 2,
     92        "no-inner-declarations": 0,
     93        "no-new": 0,
    6994        "no-proto": 0,
     95        "no-redeclare": 0,
    7096        "no-return-assign": 2,
     97        "no-shadow": 0,
    7198        "no-trailing-spaces": 2,
    7299        "no-undef": 2,
     100        "no-unused-vars": [2, {"vars": "all", "args": "none"}],
    73101        "no-underscore-dangle": 0,
    74102        "no-unused-expressions": 2,
     103        "no-use-before-define": 0,
    75104        "no-wrap-func": 2,
    76105        "quotes": [2, "double"],
  • trunk/Source/WebInspectorUI/ChangeLog

    r182114 r182142  
     12015-03-30  Tobias Reiss  <tobi+webkit@basecode.de>
     2
     3        Web Inspector: Add more ESLint rules that reflect the current state of the code base
     4        https://bugs.webkit.org/show_bug.cgi?id=143212
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * .eslintrc:
     9        Define some utilities as globals.
     10        Replace "no-comma-dangle" with "comma-dangle". "no-comma-dangle" is deprecated and does not trigger in ESLint v.0.17.1
     11        Set "new-cap" to 0 due to the usage of "WebInspector.UIString".
     12        Disable "no-redeclare" for now and enable it back as soon as block scoped `let` is used.
     13        Disable "dot-notation", "no-shadow" and "no-use-before-define" due to a lot of hits.
     14        Disable "no-inner-declarations" as this is a common pattern to save memory.
     15        * UserInterface/Views/ObjectTreePropertyTreeElement.js:
     16        * UserInterface/Models/SourceCodeLocation.js:
     17        It's not necessary to initialize x to undefined.
     18        * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
     19        * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
     20        * UserInterface/Views/TextEditor.js:
     21        * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
     22        Remove unused variable x.
     23        * UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
     24        * UserInterface/Models/PropertyPath.js:
     25        * UserInterface/Views/RadioButtonNavigationItem.js:
     26        * UserInterface/Views/ReplayDashboardView.js:
     27        * UserInterface/Models/ScriptSyntaxTree.js:
     28        * UserInterface/Views/SourceCodeTextEditor.js:
     29        * UserInterface/Views/SourceCodeTreeElement.js:
     30        Remove trailing and unexpected whitespace.
     31        * UserInterface/Views/ProbeSetDataGrid.js:
     32        * UserInterface/Views/TimelineRuler.js:
     33        Add missing semicolon.
     34        * UserInterface/Views/TimelineDataGrid.js:
     35        * UserInterface/Views/TimelineRecordFrame.js:
     36        Add missing var statement.
     37        * UserInterface/Views/TypeTokenView.js:
     38        Remove unnecessary `bind`.
     39
    1402015-03-28  Saam Barati  <saambarati1@gmail.com>
    241
  • trunk/Source/WebInspectorUI/UserInterface/Models/PropertyPath.js

    r181769 r182142  
    102102        for (var p = this; p && p.pathComponent; p = p.parent)
    103103            components.push(p.pathComponent);
    104         components.reverse()
     104        components.reverse();
    105105        return components.join("");
    106106    }
     
    127127
    128128        components.reverse();
    129         return components.join("");       
     129        return components.join("");
    130130    }
    131131
     
    215215            if (keyObject.type === "string") {
    216216                var component = ".get(" + doubleQuotedString(keyObject.description) + ")";
    217                 return new WebInspector.PropertyPath(object, component, this);               
     217                return new WebInspector.PropertyPath(object, component, this);
    218218            }
    219219
    220220            var component = ".get(" + keyObject.description + ")";
    221             return new WebInspector.PropertyPath(object, component, this);               
     221            return new WebInspector.PropertyPath(object, component, this);
    222222        }
    223            
     223
    224224        var component = WebInspector.PropertyPath.SpecialPathComponent.MapValue;
    225225        return new WebInspector.PropertyPath(object, component, this);
     
    231231        return new WebInspector.PropertyPath(object, component, this);
    232232    }
    233    
     233
    234234    appendPropertyDescriptor(object, descriptor, type)
    235235    {
     
    249249            return this.appendArrayIndex(object, descriptor.name);
    250250
    251         return this.appendPropertyName(object, descriptor.name)
     251        return this.appendPropertyName(object, descriptor.name);
    252252    }
    253253
  • trunk/Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js

    r182106 r182142  
    4646
    4747    // Public
    48    
     48
    4949    get parsedSuccessfully()
    5050    {
     
    6161    }
    6262
    63     filter(predicate, startNode) 
     63    filter(predicate, startNode)
    6464    {
    6565        console.assert(startNode && this._parsedSuccessfully);
     
    7373                nodes.push(node);
    7474            else
    75                 state.skipChildNodes = true; 
     75                state.skipChildNodes = true;
    7676        }
    7777
     
    8686        if (!this._parsedSuccessfully)
    8787            return [];
    88        
     88
    8989        var allNodes = [];
    9090        var start = 0;
     
    128128        function removeFunctionsFilter(node)
    129129        {
    130             return node.type !== WebInspector.ScriptSyntaxTree.NodeType.FunctionExpression 
     130            return node.type !== WebInspector.ScriptSyntaxTree.NodeType.FunctionExpression
    131131                && node.type !== WebInspector.ScriptSyntaxTree.NodeType.FunctionDeclaration;
    132132        }
     
    141141            }
    142142        }
    143          
     143
    144144        startNode.attachments._hasNonEmptyReturnStatement = hasNonEmptyReturnStatement;
    145145
     
    222222    _gatherIdentifiersInDeclaration(node)
    223223    {
    224         function gatherIdentifiers(node) 
     224        function gatherIdentifiers(node)
    225225        {
    226226            switch (node.type) {
     
    254254    }
    255255
    256     _defaultParserState() 
     256    _defaultParserState()
    257257    {
    258258        return {
     
    262262    }
    263263
    264     _recurse(node, callback, state) 
     264    _recurse(node, callback, state)
    265265    {
    266266        if (!node)
     
    488488    }
    489489
    490     _recurseArray(array, callback, state) 
     490    _recurseArray(array, callback, state)
    491491    {
    492492        for (var node of array)
    493493            this._recurse(node, callback, state);
    494494    }
    495    
    496     // This function translates from esprima's Abstract Syntax Tree to ours. 
     495
     496    // This function translates from esprima's Abstract Syntax Tree to ours.
    497497    // Mostly, this is just the identity function. We've added an extra isGetterOrSetter property for functions.
    498498    // Our AST complies with the Mozilla parser API:
    499499    // https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API
    500     _createInternalSyntaxTree(node) 
     500    _createInternalSyntaxTree(node)
    501501    {
    502502        if (!node)
     
    580580                body: this._createInternalSyntaxTree(node.body),
    581581            };
    582             break;           
     582            break;
    583583        case "ConditionalExpression":
    584584            result = {
     
    854854            return null;
    855855        }
    856        
     856
    857857        result.range = node.range;
    858858        // This is an object for which you can add fields to an AST node without worrying about polluting the syntax-related fields of the node.
  • trunk/Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js

    r181769 r182142  
    212212    populateLiveDisplayLocationString(element, propertyName, columnStyle, nameStyle, prefix)
    213213    {
    214         var currentDisplay = undefined;
     214        var currentDisplay;
    215215
    216216        function updateDisplayString(showAlternativeLocation, forceUpdate)
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js

    r182054 r182142  
    311311            this._clearTextMarkers(true);
    312312
    313             var styleText = this._style.text;
    314 
    315313            this._iterateOverProperties(true, function(property) {
    316314                var styleTextRange = property.styleDeclarationTextRange;
     
    396394
    397395                var codeMirrorTextMarker = marker.codeMirrorTextMarker;
    398                 var swatchMarker = this._codeMirror.setUniqueBookmark(codeMirrorTextMarker.find().from, swatchElement);
    399396
    400397                swatchInnerElement.__colorTextMarker = codeMirrorTextMarker;
  • trunk/Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js

    r182041 r182142  
    246246    _updateLayerInfoSection(layer)
    247247    {
    248         var emDash = "\u2014";
    249 
    250248        this._layerInfoSection.groups = layer ? [this._layerInfoGroup] : [this._noLayerInformationGroup];
    251249
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeMapEntryTreeElement.js

    r182042 r182142  
    9090        this.addClassName("key");
    9191    }
    92    
     92
    9393    // Protected
    9494
     
    114114        this.addClassName("value");
    115115    }
    116    
     116
    117117    // Protected
    118118
  • trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js

    r182099 r182142  
    5151        this._updateHasChildren();
    5252    }
    53    
     53
    5454    // Protected
    5555
     
    358358        var isAPI = mode !== WebInspector.ObjectTreeView.Mode.Prototype;
    359359
    360         var prototypeName = undefined;
     360        var prototypeName;
    361361        if (this.property.name === "__proto__") {
    362362            if (resolvedValue.description)
  • trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDataGrid.js

    r172650 r182142  
    4747    this._listeners.register(probeSet, WebInspector.ProbeSet.Event.ProbeRemoved, this._teardownProbe);
    4848    this._listeners.register(probeSet, WebInspector.ProbeSet.Event.SamplesCleared, this._setupData);
    49     this._listeners.register(WebInspector.Probe, WebInspector.Probe.Event.ExpressionChanged, this._probeExpressionChanged)
     49    this._listeners.register(WebInspector.Probe, WebInspector.Probe.Event.ExpressionChanged, this._probeExpressionChanged);
    5050    this._listeners.install();
    5151
    5252    this._setupData();
    53 }
     53};
    5454
    5555WebInspector.ProbeSetDataGrid.DataUpdatedStyleClassName = "data-updated";
     
    193193            this._updateNodeForFrame(frame);
    194194    }
    195 }
     195};
  • trunk/Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js

    r164543 r182142  
    7171
    7272        // Default state.
    73         var styleText = parentSelector + " ." + classNames + " > .glyph { background-image: -webkit-canvas(" + this._canvasIdentifier() + "); background-size: " +  this._imageWidth + "px " + this._imageHeight + "px; }\n";
     73        var styleText = parentSelector + " ." + classNames + " > .glyph { background-image: -webkit-canvas(" + this._canvasIdentifier() + "); background-size: " + this._imageWidth + "px " + this._imageHeight + "px; }\n";
    7474
    7575        // Selected state.
  • trunk/Source/WebInspectorUI/UserInterface/Views/ReplayDashboardView.js

    r182055 r182142  
    6363            this._playbackPaused();
    6464    }
    65    
     65
    6666    // Private
    6767
  • trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js

    r182041 r182142  
    9494            var extraPropertyDescriptor = null;
    9595            var collapsedByDefault = false;
    96             var dontHighlightNonEnumerableProperties = true;
    9796
    9897            ++sectionCountByType[scope.type];
     
    102101                    foundLocalScope = true;
    103102                    collapsedByDefault = false;
    104                     dontHighlightNonEnumerableProperties = true;
    105103
    106104                    title = WebInspector.UIString("Local Variables");
     
    112110                case WebInspector.ScopeChainNode.Type.Closure:
    113111                    title = WebInspector.UIString("Closure Variables");
    114                     dontHighlightNonEnumerableProperties = true;
    115112                    collapsedByDefault = false;
    116113                    break;
     
    118115                case WebInspector.ScopeChainNode.Type.Catch:
    119116                    title = WebInspector.UIString("Catch Variables");
    120                     dontHighlightNonEnumerableProperties = true;
    121117                    collapsedByDefault = false;
    122118                    break;
     
    124120                case WebInspector.ScopeChainNode.Type.FunctionName:
    125121                    title = WebInspector.UIString("Function Name Variable");
    126                     dontHighlightNonEnumerableProperties = true;
    127122                    collapsedByDefault = true;
    128123                    break;
     
    131126                    title = WebInspector.UIString("With Object Properties");
    132127                    collapsedByDefault = foundLocalScope;
    133                     dontHighlightNonEnumerableProperties = false;
    134128                    break;
    135129
    136130                case WebInspector.ScopeChainNode.Type.Global:
    137131                    title = WebInspector.UIString("Global Variables");
    138                     dontHighlightNonEnumerableProperties = false;
    139132                    collapsedByDefault = true;
    140133                    break;
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

    r182105 r182142  
    117117
    118118        this._dismissPopover();
    119        
     119
    120120        this._dismissEditingController(true);
    121121
     
    299299    prettyPrint(pretty)
    300300    {
    301         // The annotators must be cleared before pretty printing takes place and resumed 
    302         // after so that they clear their annotations in a known state and insert new annotations 
     301        // The annotators must be cleared before pretty printing takes place and resumed
     302        // after so that they clear their annotations in a known state and insert new annotations
    303303        // in the new state.
    304304        var shouldResumeTypeTokenAnnotator = this._typeTokenAnnotator && this._typeTokenAnnotator.isActive();
     
    869869
    870870            var iconElement = widgetElement.appendChild(document.createElement("span"));
    871             iconElement.className = "icon";           
     871            iconElement.className = "icon";
    872872
    873873            var textElement = widgetElement.appendChild(document.createElement("span"));
     
    928928        if (textElement.offsetWidth !== textElement.scrollWidth)
    929929            return true;
    930        
     930
    931931        return false;
    932932    }
     
    15521552    _trackPopoverEvents()
    15531553    {
    1554         if (!this._popoverEventListeners) 
     1554        if (!this._popoverEventListeners)
    15551555            this._popoverEventListeners = new WebInspector.EventListenerSet(this, "Popover listeners");
    15561556        if (!this._popoverEventListenersAreRegistered) {
     
    16231623        if (this._editingController)
    16241624            this._editingController.dismissHoverMenu(discrete);
    1625        
     1625
    16261626        this.tokenTrackingController.hoveredMarker = null;
    16271627        delete this._editingController;
     
    16291629
    16301630    // CodeMirrorEditingController Delegate
    1631    
     1631
    16321632    editingControllerDidStartEditing(editingController)
    16331633    {
     
    16391639        // We clear the marker since we'll reset it after editing.
    16401640        editingController.marker.clear();
    1641        
     1641
    16421642        // We ignore content changes made as a result of color editing.
    16431643        this._ignoreContentDidChange++;
    16441644    }
    1645    
     1645
    16461646    editingControllerDidFinishEditing(editingController)
    16471647    {
     
    16711671                this._enableScrollEventsForTypeTokenAnnotator();
    16721672        } else {
    1673             // Because we disable type profiling when exiting the inspector, there is no need to call 
    1674             // RuntimeAgent.disableTypeProfiler() here.  If we were to call it here, JavaScriptCore would 
    1675             // compile out all the necessary type profiling information, so if a user were to quickly press then 
    1676             // unpress the type profiling button, we wouldn't be able to re-show type information which would 
     1673            // Because we disable type profiling when exiting the inspector, there is no need to call
     1674            // RuntimeAgent.disableTypeProfiler() here.  If we were to call it here, JavaScriptCore would
     1675            // compile out all the necessary type profiling information, so if a user were to quickly press then
     1676            // unpress the type profiling button, we wouldn't be able to re-show type information which would
    16771677            // provide a confusing user experience.
    16781678
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTreeElement.js

    r182042 r182142  
    148148        var currentFolderTreeElement = this;
    149149
    150         for (var i = 0 ; i < components.length - 1; ++i) {
     150        for (var i = 0; i < components.length - 1; ++i) {
    151151            var componentName = components[i];
    152152            currentPath += (i ? "/" : "") + componentName;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js

    r182054 r182142  
    3030        super();
    3131
    32         var text = (element ? element.textContent : "");
    3332        this._element = element || document.createElement("div");
    3433        this._element.classList.add("text-editor");
     
    758757                var mappedAnchorLocation = this._formatterSourceMap.originalToFormatted(oldSelectionAnchor.line, oldSelectionAnchor.ch);
    759758                var mappedHeadLocation = this._formatterSourceMap.originalToFormatted(oldSelectionHead.line, oldSelectionHead.ch);
    760                 newSelectionAnchor = {line:mappedAnchorLocation.lineNumber, ch:mappedAnchorLocation.columnNumber};
    761                 newSelectionHead = {line:mappedHeadLocation.lineNumber, ch:mappedHeadLocation.columnNumber};
     759                newSelectionAnchor = {line: mappedAnchorLocation.lineNumber, ch: mappedAnchorLocation.columnNumber};
     760                newSelectionHead = {line: mappedHeadLocation.lineNumber, ch: mappedHeadLocation.columnNumber};
    762761            } else {
    763762                this._codeMirror.undo();
     
    781780                var mappedAnchorLocation = this._formatterSourceMap.formattedToOriginal(oldSelectionAnchor.line, oldSelectionAnchor.ch);
    782781                var mappedHeadLocation = this._formatterSourceMap.formattedToOriginal(oldSelectionHead.line, oldSelectionHead.ch);
    783                 newSelectionAnchor = {line:mappedAnchorLocation.lineNumber, ch:mappedAnchorLocation.columnNumber};
    784                 newSelectionHead = {line:mappedHeadLocation.lineNumber, ch:mappedHeadLocation.columnNumber};
     782                newSelectionAnchor = {line: mappedAnchorLocation.lineNumber, ch: mappedAnchorLocation.columnNumber};
     783                newSelectionHead = {line: mappedHeadLocation.lineNumber, ch: mappedHeadLocation.columnNumber};
    785784
    786785                this._formatterSourceMap = null;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js

    r182042 r182142  
    6363
    6464    window.addEventListener("resize", this._windowResized.bind(this));
    65 }
     65};
    6666
    6767WebInspector.TimelineDataGrid.StyleClassName = "timeline";
     
    169169
    170170        parentElement = parentElement || this._treeOutlineDataGridSynchronizer.treeOutline;
    171         parentNode = parentElement.root ? this : this._treeOutlineDataGridSynchronizer.dataGridNodeForTreeElement(parentElement);
     171        var parentNode = parentElement.root ? this : this._treeOutlineDataGridSynchronizer.dataGridNodeForTreeElement(parentElement);
    172172
    173173        console.assert(parentNode);
     
    468468
    469469        var callFrames = this.selectedNode.record.callFrames;
    470         for (var i = 0 ; i < callFrames.length; ++i) {
     470        for (var i = 0; i < callFrames.length; ++i) {
    471471            var callFrameTreeElement = new WebInspector.CallFrameTreeElement(callFrames[i]);
    472472            this._popoverCallStackTreeOutline.appendChild(callFrameTreeElement);
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordFrame.js

    r181769 r182142  
    213213        }
    214214
    215         for (type in WebInspector.TimelineRecord.Type) {
     215        for (var type in WebInspector.TimelineRecord.Type) {
    216216            var recordType = WebInspector.TimelineRecord.Type[type];
    217217            var duration = displayRecord.durationForRecords(recordType);
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js

    r181769 r182142  
    354354            firstTime: firstDividerTime,
    355355            lastTime: lastDividerTime,
    356         }
     356        };
    357357
    358358        if (Object.shallowEqual(dividerData, this._currentDividers))
  • trunk/Source/WebInspectorUI/UserInterface/Views/TypeTokenView.js

    r182114 r182142  
    2828    constructor(tokenAnnotator, shouldHaveRightMargin, shouldHaveLeftMargin, titleType, functionOrVariableName)
    2929    {
    30         console.assert(titleType === WebInspector.TypeTokenView.TitleType.Variable  || titleType === WebInspector.TypeTokenView.TitleType.ReturnStatement);
     30        console.assert(titleType === WebInspector.TypeTokenView.TitleType.Variable || titleType === WebInspector.TypeTokenView.TitleType.ReturnStatement);
    3131
    3232        super();
     
    111111            if (timeoutID)
    112112                clearTimeout(timeoutID);
    113         }.bind(this));
     113        });
    114114    }
    115115
     
    142142        }
    143143
    144         // The order of these checks are important. 
     144        // The order of these checks are important.
    145145        // For example, if a value is only a function, it is contained in TypeFunction, but it is also contained in (TypeFunction | TypeNull).
    146146        // Therefore, more specific types must be checked first.
     
    179179        if (typeSet.isContainedIn(WebInspector.TypeSet.TypeBit.Symbol | WebInspector.TypeSet.NullOrUndefinedTypeBits))
    180180            return "Symbol?";
    181        
     181
    182182        if (typeSet.isContainedIn(WebInspector.TypeSet.TypeBit.Object | WebInspector.TypeSet.TypeBit.Function | WebInspector.TypeSet.TypeBit.String))
    183183            return "Object";
Note: See TracChangeset for help on using the changeset viewer.