Changeset 121790 in webkit


Ignore:
Timestamp:
Jul 3, 2012 10:47:24 AM (12 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Anonymous scripts (evals) should not be added to Workspace.
https://bugs.webkit.org/show_bug.cgi?id=90467

Reviewed by Pavel Feldman.

  • inspector/front-end/ResourceScriptMapping.js:

(WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
(WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded):
(WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced):
(WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved):

  • inspector/front-end/ScriptSnippetModel.js:

(WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):

  • inspector/front-end/ScriptsPanel.js:

(WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121789 r121790  
     12012-07-03  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Anonymous scripts (evals) should not be added to Workspace.
     4        https://bugs.webkit.org/show_bug.cgi?id=90467
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/front-end/ResourceScriptMapping.js:
     9        (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
     10        (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded):
     11        (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced):
     12        (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved):
     13        * inspector/front-end/ScriptSnippetModel.js:
     14        (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
     15        * inspector/front-end/ScriptsPanel.js:
     16        (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
     17
    1182012-07-03  Robert Hogan  <robert@webkit.org>
    219
  • trunk/Source/WebCore/inspector/front-end/ResourceScriptMapping.js

    r119898 r121790  
    162162    _uiSourceCodeAdded: function(rawSourceCode, uiSourceCode)
    163163    {
     164        if (!uiSourceCode.url)
     165            return;
    164166        this._rawSourceCodeForUISourceCode.put(uiSourceCode, rawSourceCode);
    165167        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCode);
     
    173175    _uiSourceCodeReplaced: function(rawSourceCode, oldUISourceCode, uiSourceCode)
    174176    {
     177        if (!uiSourceCode.url)
     178            return;
    175179        this._rawSourceCodeForUISourceCode.remove(oldUISourceCode);
    176180        this._rawSourceCodeForUISourceCode.put(uiSourceCode, rawSourceCode);
     
    189193    _uiSourceCodeRemoved: function(rawSourceCode, uiSourceCode)
    190194    {
     195        if (!uiSourceCode.url)
     196            return;
    191197        this._rawSourceCodeForUISourceCode.remove(uiSourceCode);
    192198        this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, uiSourceCode);
  • trunk/Source/WebCore/inspector/front-end/ScriptSnippetModel.js

    r121765 r121790  
    290290        this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;
    291291        this._scriptForUISourceCode.put(uiSourceCode, script);
    292         this._snippetScriptMapping._fireUISourceCodeAdded(uiSourceCode);
    293292        script.setSourceMapping(this._snippetScriptMapping);
    294293    },
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r121778 r121790  
    248248    _uiSourceCodeAdded: function(uiSourceCode)
    249249    {
    250         if (!uiSourceCode.url || uiSourceCode.isSnippetEvaluation) {
    251             // Anonymous sources and snippets evaluations are shown only when stepping.
    252             return;
    253         }
    254 
    255250        this._addUISourceCode(uiSourceCode);
    256251    },
Note: See TracChangeset for help on using the changeset viewer.