Title: [171013] trunk/Source
Revision
171013
Author
[email protected]
Date
2014-07-11 14:54:19 -0700 (Fri, 11 Jul 2014)

Log Message

Web Inspector: Debugger Pause button does not work
https://bugs.webkit.org/show_bug.cgi?id=134785

Reviewed by Timothy Hatcher.

Source/_javascript_Core:
* CMakeLists.txt:
* DerivedSources.make:
Minification strips the sourceURL command. Add it back with minification.

Source/WebCore:
* CMakeLists.txt:
* DerivedSources.make:
* inspector/CommandLineAPIModuleSource.js:
Minification strips the sourceURL command. Add it back with minification.

Source/WebInspectorUI:
Previously we were automatically resuming if we had no recognized
call frames in the call stack we get when paused. However, we
were accidentally skipping over anonymous scripts instead of
just Web Inspector originated call frames.

Now that we allow anonymous scripts we can step into anonymous
scripts (e.g. evals, new Function(...)) as expected.

Also, remove the condition of automatically resuming if the
call stack was empty. The UI handles this with "No Call Frames".

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (171012 => 171013)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2014-07-11 21:54:19 UTC (rev 171013)
@@ -899,7 +899,8 @@
     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
     MAIN_DEPENDENCY ${_javascript_CORE_DIR}/inspector/InjectedScriptSource.js
     DEPENDS ${_javascript_Core_INSPECTOR_SCRIPTS_DIR}/xxd.pl ${_javascript_Core_INSPECTOR_SCRIPTS_DIR}/jsmin.py
-    COMMAND ${PYTHON_EXECUTABLE} ${_javascript_Core_INSPECTOR_SCRIPTS_DIR}/jsmin.py < ${_javascript_CORE_DIR}/inspector/InjectedScriptSource.js > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
+    COMMAND echo "//# sourceURL=__WebInspectorInjectedScript__" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
+    COMMAND ${PYTHON_EXECUTABLE} ${_javascript_Core_INSPECTOR_SCRIPTS_DIR}/jsmin.py < ${_javascript_CORE_DIR}/inspector/InjectedScriptSource.js >> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
     COMMAND ${PERL_EXECUTABLE} ${_javascript_Core_INSPECTOR_SCRIPTS_DIR}/xxd.pl InjectedScriptSource_js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h
     VERBATIM)
 

Modified: trunk/Source/_javascript_Core/ChangeLog (171012 => 171013)


--- trunk/Source/_javascript_Core/ChangeLog	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-07-11 21:54:19 UTC (rev 171013)
@@ -1,3 +1,14 @@
+2014-07-11  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Debugger Pause button does not work
+        https://bugs.webkit.org/show_bug.cgi?id=134785
+
+        Reviewed by Timothy Hatcher.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        Minification strips the sourceURL command. Add it back with minification.
+
 2014-07-11  [email protected]  <[email protected]>
 
         [Win] Enable DFG JIT.

Modified: trunk/Source/_javascript_Core/DerivedSources.make (171012 => 171013)


--- trunk/Source/_javascript_Core/DerivedSources.make	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/_javascript_Core/DerivedSources.make	2014-07-11 21:54:19 UTC (rev 171013)
@@ -147,7 +147,8 @@
 	$(PYTHON) $(_javascript_Core)/inspector/scripts/CodeGeneratorInspector.py ./InspectorJS.json --output_h_dir . --output_cpp_dir . --output_js_dir . --output_type _javascript_
 
 InjectedScriptSource.h : inspector/InjectedScriptSource.js $(_javascript_Core)/inspector/scripts/jsmin.py $(_javascript_Core)/inspector/scripts/xxd.pl
-	$(PYTHON) $(_javascript_Core)/inspector/scripts/jsmin.py < $(_javascript_Core)/inspector/InjectedScriptSource.js > ./InjectedScriptSource.min.js
+	echo "//# sourceURL=__WebInspectorInjectedScript__" > ./InjectedScriptSource.min.js
+	$(PYTHON) $(_javascript_Core)/inspector/scripts/jsmin.py < $(_javascript_Core)/inspector/InjectedScriptSource.js >> ./InjectedScriptSource.min.js
 	$(PERL) $(_javascript_Core)/inspector/scripts/xxd.pl InjectedScriptSource_js ./InjectedScriptSource.min.js InjectedScriptSource.h
 	rm -f ./InjectedScriptSource.min.js
 

Modified: trunk/Source/WebCore/CMakeLists.txt (171012 => 171013)


--- trunk/Source/WebCore/CMakeLists.txt	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/WebCore/CMakeLists.txt	2014-07-11 21:54:19 UTC (rev 171013)
@@ -3304,7 +3304,8 @@
     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.h ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.min.js
     MAIN_DEPENDENCY inspector/CommandLineAPIModuleSource.js
     DEPENDS ${WebCore_INSPECTOR_SCRIPTS_DIR}/xxd.pl ${WebCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py
-    COMMAND ${PYTHON_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py < ${WEBCORE_DIR}/inspector/CommandLineAPIModuleSource.js > ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.min.js
+    COMMAND echo "//# sourceURL=__WebInspectorCommandLineAPIModuleSource__" > ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.min.js
+    COMMAND ${PYTHON_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/jsmin.py < ${WEBCORE_DIR}/inspector/CommandLineAPIModuleSource.js >> ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.min.js
     COMMAND ${PERL_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/xxd.pl CommandLineAPIModuleSource_js ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.min.js ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.h
     VERBATIM)
 list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CommandLineAPIModuleSource.h)

Modified: trunk/Source/WebCore/ChangeLog (171012 => 171013)


--- trunk/Source/WebCore/ChangeLog	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/WebCore/ChangeLog	2014-07-11 21:54:19 UTC (rev 171013)
@@ -1,3 +1,15 @@
+2014-07-11  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Debugger Pause button does not work
+        https://bugs.webkit.org/show_bug.cgi?id=134785
+
+        Reviewed by Timothy Hatcher.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * inspector/CommandLineAPIModuleSource.js:
+        Minification strips the sourceURL command. Add it back with minification.
+
 2014-07-11  Andreas Kling  <[email protected]>
 
         Use the bare minimum tile coverage rect when under memory pressure.

Modified: trunk/Source/WebCore/DerivedSources.make (171012 => 171013)


--- trunk/Source/WebCore/DerivedSources.make	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/WebCore/DerivedSources.make	2014-07-11 21:54:19 UTC (rev 171013)
@@ -1185,7 +1185,8 @@
 all : CommandLineAPIModuleSource.h
 
 CommandLineAPIModuleSource.h : CommandLineAPIModuleSource.js
-	$(PYTHON) $(InspectorScripts)/jsmin.py <$(WebCore)/inspector/CommandLineAPIModuleSource.js > ./CommandLineAPIModuleSource.min.js
+	echo "//# sourceURL=__WebInspectorCommandLineAPIModuleSource__" > ./CommandLineAPIModuleSource.min.js
+	$(PYTHON) $(InspectorScripts)/jsmin.py <$(WebCore)/inspector/CommandLineAPIModuleSource.js >> ./CommandLineAPIModuleSource.min.js
 	$(PERL) $(InspectorScripts)/xxd.pl CommandLineAPIModuleSource_js ./CommandLineAPIModuleSource.min.js CommandLineAPIModuleSource.h
 	rm -f ./CommandLineAPIModuleSource.min.js
 

Modified: trunk/Source/WebCore/inspector/CommandLineAPIModuleSource.js (171012 => 171013)


--- trunk/Source/WebCore/inspector/CommandLineAPIModuleSource.js	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/WebCore/inspector/CommandLineAPIModuleSource.js	2014-07-11 21:54:19 UTC (rev 171013)
@@ -26,6 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+//# sourceURL=__WebInspectorCommandLineAPIModuleSource__
+
 /**
  * @param {InjectedScriptHost} InjectedScriptHost
  * @param {Window} inspectedWindow

Modified: trunk/Source/WebInspectorUI/ChangeLog (171012 => 171013)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-07-11 21:54:19 UTC (rev 171013)
@@ -1,5 +1,26 @@
 2014-07-11  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Debugger Pause button does not work
+        https://bugs.webkit.org/show_bug.cgi?id=134785
+
+        Reviewed by Timothy Hatcher.
+
+        Previously we were automatically resuming if we had no recognized
+        call frames in the call stack we get when paused. However, we
+        were accidentally skipping over anonymous scripts instead of
+        just Web Inspector originated call frames.
+
+        Now that we allow anonymous scripts we can step into anonymous
+        scripts (e.g. evals, new Function(...)) as expected.
+
+        Also, remove the condition of automatically resuming if the
+        call stack was empty. The UI handles this with "No Call Frames".
+
+        * UserInterface/Controllers/DebuggerManager.js:
+        (WebInspector.DebuggerManager.prototype.debuggerDidPause):
+
+2014-07-11  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: CSS Autocompletion: "background" only has colors, should support others
         https://bugs.webkit.org/show_bug.cgi?id=134839
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (171012 => 171013)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2014-07-11 21:10:46 UTC (rev 171012)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2014-07-11 21:54:19 UTC (rev 171013)
@@ -358,8 +358,13 @@
         for (var i = 0; i < callFramesPayload.length; ++i) {
             var callFramePayload = callFramesPayload[i];
             var sourceCodeLocation = this._sourceCodeLocationFromPayload(callFramePayload.location);
+            // FIXME: There may be useful call frames without a source code location (native callframes), should we include them?
+            if (!sourceCodeLocation)
+                continue;
+            if (!sourceCodeLocation.sourceCode)
+                continue;
             // Exclude the case where the call frame is in the inspector code.
-            if (!sourceCodeLocation || !sourceCodeLocation._sourceCode || !sourceCodeLocation._sourceCode._url || sourceCodeLocation._sourceCode._url.indexOf("__WebInspector") === 0)
+            if (sourceCodeLocation.sourceCode.url && sourceCodeLocation.sourceCode.url.startsWith("__WebInspector"))
                 continue;
             var thisObject = WebInspector.RemoteObject.fromPayload(callFramePayload.this);
             var scopeChain = this._scopeChainFromPayload(callFramePayload.scopeChain);
@@ -367,11 +372,6 @@
             this._callFrames.push(callFrame);
         }
 
-        if (!this._callFrames.length) {
-            this.resume();
-            return;
-        }
-
         this._activeCallFrame = this._callFrames[0];
 
         if (!wasStillPaused)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to