Title: [170863] trunk/Source/WebInspectorUI
Revision
170863
Author
commit-qu...@webkit.org
Date
2014-07-07 16:44:58 -0700 (Mon, 07 Jul 2014)

Log Message

Web Inspector: Uncaught Exception debugging iOS 7 NetworkAgent.loadResource is unavailable
https://bugs.webkit.org/show_bug.cgi?id=134689

Patch by Joseph Pecoraro <pecor...@apple.com> on 2014-07-07
Reviewed by Darin Adler.

Gracefully handle if NetworkAgent.loadResource is unavailable.

* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
* UserInterface/Models/SourceMapResource.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (170862 => 170863)


--- trunk/Source/WebInspectorUI/ChangeLog	2014-07-07 23:44:49 UTC (rev 170862)
+++ trunk/Source/WebInspectorUI/ChangeLog	2014-07-07 23:44:58 UTC (rev 170863)
@@ -1,3 +1,16 @@
+2014-07-07  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Uncaught Exception debugging iOS 7 NetworkAgent.loadResource is unavailable
+        https://bugs.webkit.org/show_bug.cgi?id=134689
+
+        Reviewed by Darin Adler.
+
+        Gracefully handle if NetworkAgent.loadResource is unavailable.
+
+        * UserInterface/Controllers/SourceMapManager.js:
+        (WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
+        * UserInterface/Models/SourceMapResource.js:
+
 2014-07-01  Jonathan Wells  <jonowe...@apple.com>
 
         Web Inspector: Hexadecimal color values in all CSS editors are purple when they should be blue

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js (170862 => 170863)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js	2014-07-07 23:44:49 UTC (rev 170862)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js	2014-07-07 23:44:58 UTC (rev 170863)
@@ -116,7 +116,8 @@
         if (!frameIdentifier)
             frameIdentifier = WebInspector.frameResourceManager.mainFrame.id;
 
-        NetworkAgent.loadResource(frameIdentifier, sourceMapURL, sourceMapLoaded.bind(this));
+        if (NetworkAgent.loadResource)
+            NetworkAgent.loadResource(frameIdentifier, sourceMapURL, sourceMapLoaded.bind(this));
     },
 
     _loadAndParseFailed: function(sourceMapURL)

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js (170862 => 170863)


--- trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js	2014-07-07 23:44:49 UTC (rev 170862)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js	2014-07-07 23:44:58 UTC (rev 170863)
@@ -116,6 +116,11 @@
             callback(null, body, base64encoded);
         }
 
+        if (!NetworkAgent.loadResource) {
+            sourceMapResourceLoaded.call(this, "error: no NetworkAgent.loadResource");
+            return false;
+        }
+
         var frameIdentifier = null;
         if (this._sourceMap.originalSourceCode instanceof WebInspector.Resource && this._sourceMap.originalSourceCode.parentFrame)
             frameIdentifier = this._sourceMap.originalSourceCode.parentFrame.id;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to