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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121790
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-03 Vsevolod Vlasov <vsevik@chromium.org>
+
+ 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):
+
2012-07-03 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: floats-wrap-top-below-inline-* fail
*/
_uiSourceCodeAdded: function(rawSourceCode, uiSourceCode)
{
+ if (!uiSourceCode.url)
+ return;
this._rawSourceCodeForUISourceCode.put(uiSourceCode, rawSourceCode);
this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, uiSourceCode);
},
*/
_uiSourceCodeReplaced: function(rawSourceCode, oldUISourceCode, uiSourceCode)
{
+ if (!uiSourceCode.url)
+ return;
this._rawSourceCodeForUISourceCode.remove(oldUISourceCode);
this._rawSourceCodeForUISourceCode.put(uiSourceCode, rawSourceCode);
*/
_uiSourceCodeRemoved: function(rawSourceCode, uiSourceCode)
{
+ if (!uiSourceCode.url)
+ return;
this._rawSourceCodeForUISourceCode.remove(uiSourceCode);
this.dispatchEventToListeners(WebInspector.UISourceCodeProvider.Events.UISourceCodeRemoved, uiSourceCode);
},
uiSourceCode.isSnippetEvaluation = true;
this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;
this._scriptForUISourceCode.put(uiSourceCode, script);
- this._snippetScriptMapping._fireUISourceCodeAdded(uiSourceCode);
script.setSourceMapping(this._snippetScriptMapping);
},
*/
_uiSourceCodeAdded: function(uiSourceCode)
{
- if (!uiSourceCode.url || uiSourceCode.isSnippetEvaluation) {
- // Anonymous sources and snippets evaluations are shown only when stepping.
- return;
- }
-
this._addUISourceCode(uiSourceCode);
},