Unreviewed, rolling out r103405.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 08:44:47 +0000 (08:44 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 08:44:47 +0000 (08:44 +0000)
http://trac.webkit.org/changeset/103405
https://bugs.webkit.org/show_bug.cgi?id=74088

it broke WorkerDevToolsSanityTest.InspectSharedWorker

* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
* inspector/front-end/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.searchInContent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103500 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorDebuggerAgent.cpp
Source/WebCore/inspector/InspectorDebuggerAgent.h
Source/WebCore/inspector/front-end/DebuggerModel.js
Source/WebCore/inspector/front-end/RawSourceCode.js
Source/WebCore/inspector/front-end/Script.js

index 7679a8754cbeeda327a46e6e2068282a52a8f410..2802a634d9b4ee3a1d1cf09660f1951ba9f7d354 100644 (file)
@@ -1,3 +1,24 @@
+2011-12-22  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Unreviewed, rolling out r103405.
+        http://trac.webkit.org/changeset/103405
+        https://bugs.webkit.org/show_bug.cgi?id=74088
+
+        it broke WorkerDevToolsSanityTest.InspectSharedWorker
+
+        * inspector/Inspector.json:
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::didParseSource):
+        * inspector/InspectorDebuggerAgent.h:
+        * inspector/front-end/DebuggerModel.js:
+        (WebInspector.DebuggerModel.prototype._parsedScriptSource):
+        (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
+        * inspector/front-end/RawSourceCode.js:
+        (WebInspector.RawSourceCode):
+        * inspector/front-end/Script.js:
+        (WebInspector.Script):
+        (WebInspector.Script.prototype.searchInContent):
+
 2011-12-21  Darin Adler  <darin@apple.com>
 
         Make ~CSSParserSelector use Vector<OwnPtr>
index 1def267fe739aab12a36940d480de2577bf28bbf..022cf3d3cf1c8ef88ccc718aa353a55864b49d11 100644 (file)
                     { "name": "startColumn", "type": "integer", "description": "Column offset of the script within the resource with given URL." },
                     { "name": "endLine", "type": "integer", "description": "Last line of the script." },
                     { "name": "endColumn", "type": "integer", "description": "Length of the last line of the script." },
-                    { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." },
-                    { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }
+                    { "name": "isContentScript", "type": "boolean", "optional": true, "description": "Determines whether this script is a user extension script." }
                 ],
                 "description": "Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger."
             },
index 135e9a815caddfd0e1db27dc05b0000839bd427a..1b04aa58ba9de1deabec7389e12e22eb71d03c65 100644 (file)
@@ -35,7 +35,6 @@
 #include "InjectedScript.h"
 #include "InjectedScriptManager.h"
 #include "InspectorFrontend.h"
-#include "InspectorPageAgent.h"
 #include "InspectorState.h"
 #include "InspectorValues.h"
 #include "InstrumentingAgents.h"
@@ -474,28 +473,12 @@ PassRefPtr<InspectorArray> InspectorDebuggerAgent::currentCallFrames()
     return injectedScript.wrapCallFrames(m_currentCallStack);
 }
 
-String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script)
-{
-    DEFINE_STATIC_LOCAL(String, sourceMapHttpHeader, ("X-SourceMap"));
-
-    if (script.url.isEmpty())
-        return String();
-
-    InspectorPageAgent* pageAgent = m_instrumentingAgents->inspectorPageAgent();
-    CachedResource* resource = pageAgent->cachedResource(pageAgent->mainFrame(), KURL(ParsedURLString, script.url));
-    if (resource)
-        return resource->response().httpHeaderField(sourceMapHttpHeader);
-    return String();
-}
-
 // JavaScriptDebugListener functions
 
 void InspectorDebuggerAgent::didParseSource(const String& scriptId, const Script& script)
 {
     // Don't send script content to the front end until it's really needed.
-    const bool* isContentScript = script.isContentScript ? &script.isContentScript : 0;
-    String sourceMapURL = sourceMapURLForScript(script);
-    m_frontend->scriptParsed(scriptId, script.url, script.startLine, script.startColumn, script.endLine, script.endColumn, isContentScript, sourceMapURL);
+    m_frontend->scriptParsed(scriptId, script.url, script.startLine, script.startColumn, script.endLine, script.endColumn, script.isContentScript ? &script.isContentScript : 0);
 
     m_scripts.set(scriptId, script);
 
index 01fca957d9662b8c9595ce51e1ebea2cf2ca3186..8939af80f45870f76d22afb29eb5abaa6a929f14 100644 (file)
@@ -141,8 +141,6 @@ private:
     bool assertPaused(ErrorString*);
     void clearBreakDetails();
 
-    String sourceMapURLForScript(const Script&);
-
     typedef HashMap<String, Script> ScriptsMap;
     typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpointIdsMap;
 
index b85d058e3720a3403cb5ef5c5c128db12fe3cbee..a0d00c40b7f125aa3b498b932bd83d45e3a1dad1 100644 (file)
@@ -325,9 +325,9 @@ WebInspector.DebuggerModel.prototype = {
      * @param {number} endColumn
      * @param {boolean} isContentScript
      */
-    _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL)
+    _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript)
     {
-        var script = new WebInspector.Script(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL);
+        var script = new WebInspector.Script(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript);
         this._scripts[scriptId] = script;
         this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ParsedScriptSource, script);
     },
@@ -394,9 +394,9 @@ WebInspector.DebuggerDispatcher.prototype = {
      * @param {number} endColumn
      * @param {boolean=} isContentScript
      */
-    scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL)
+    scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript)
     {
-        this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL);
+        this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript);
     },
 
     /**
index 3756a4bfc5e5f97f4b7933462346ae110e3d1c22..1a06ae75d7e31ac6e5e41b98ea127f7c8469a200 100644 (file)
@@ -45,7 +45,6 @@ WebInspector.RawSourceCode = function(id, script, resource, formatter, formatted
     this.id = id;
     this.url = script.sourceURL;
     this.isContentScript = script.isContentScript;
-    this.sourceMapURL = script.sourceMapURL;
     this._scripts = [script];
     this._formatter = formatter;
     this._formatted = formatted;
index 21cfbf1ca7d2a659753167a2634ee7402a144194..bd2a77b337686a75acd4dca9dc9f05c8a30168f8 100644 (file)
@@ -33,7 +33,7 @@
  * @param {number} endColumn
  * @param {boolean} isContentScript
  */
-WebInspector.Script = function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL)
+WebInspector.Script = function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript)
 {
     this.scriptId = scriptId;
     this.sourceURL = sourceURL;
@@ -42,7 +42,6 @@ WebInspector.Script = function(scriptId, sourceURL, startLine, startColumn, endL
     this.endLine = endLine;
     this.endColumn = endColumn;
     this.isContentScript = isContentScript;
-    this.sourceMapURL = sourceMapURL;
 }
 
 WebInspector.Script.prototype = {
@@ -97,14 +96,14 @@ WebInspector.Script.prototype = {
             }
             callback(result || []);
         }
-
+        
         if (this.scriptId) {
             // Script failed to parse.
             DebuggerAgent.searchInContent(this.scriptId, query, caseSensitive, isRegex, innerCallback.bind(this));
         } else
             callback([]);
     },
-
+    
     /**
      * @param {string} newSource
      * @param {function(?Protocol.Error, Array.<DebuggerAgent.CallFrame>=)} callback