summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfeldman <pfeldman@chromium.org>2016-01-01 12:44:00 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-01 20:44:58 +0000
commit2e05c7bee0c76ecffbfe6f87a3741828efadfa81 (patch)
treeba07b13aa5ff4a34c935c4ad27d7916107177179
parent27b30426bc8fde4449e1ef09b565687207f3564c (diff)
downloadchromium_src-2e05c7bee0c76ecffbfe6f87a3741828efadfa81.zip
chromium_src-2e05c7bee0c76ecffbfe6f87a3741828efadfa81.tar.gz
chromium_src-2e05c7bee0c76ecffbfe6f87a3741828efadfa81.tar.bz2
DevTools: follow up to r367253, de-normalize filesystem path when talking to host.
TBR=dgozman NOTRY=true BUG=571393 Review URL: https://codereview.chromium.org/1555853002 Cr-Commit-Position: refs/heads/master@{#367265}
-rw-r--r--third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js14
-rw-r--r--third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js6
2 files changed, 18 insertions, 2 deletions
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
index 70bb761..78665c1 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
@@ -117,6 +117,20 @@ WebInspector.IsolatedFileSystem.normalizePath = function(fileSystemPath)
return fileSystemPath;
}
+/**
+ * @param {string} fileSystemPath
+ * @return {string}
+ */
+WebInspector.IsolatedFileSystem.denormalizePath = function(fileSystemPath)
+{
+ fileSystemPath = fileSystemPath.substring("file://".length);
+ if (WebInspector.isWin()) {
+ fileSystemPath = fileSystemPath.replace(/\//g, "\\");
+ fileSystemPath = fileSystemPath.substring(1);
+ }
+ return fileSystemPath;
+}
+
WebInspector.IsolatedFileSystem.prototype = {
/**
* @return {string}
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
index 333db74..88b8dc2 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
@@ -72,7 +72,7 @@ WebInspector.IsolatedFileSystemManager.prototype = {
*/
addFileSystem: function(fileSystemPath)
{
- InspectorFrontendHost.addFileSystem(fileSystemPath);
+ InspectorFrontendHost.addFileSystem(WebInspector.IsolatedFileSystem.denormalizePath(fileSystemPath));
},
/**
@@ -80,7 +80,8 @@ WebInspector.IsolatedFileSystemManager.prototype = {
*/
removeFileSystem: function(fileSystemPath)
{
- InspectorFrontendHost.removeFileSystem(fileSystemPath);
+
+ InspectorFrontendHost.removeFileSystem(WebInspector.IsolatedFileSystem.denormalizePath(fileSystemPath));
},
/**
@@ -170,6 +171,7 @@ WebInspector.IsolatedFileSystemManager.prototype = {
*/
_fileSystemRemoved: function(fileSystemPath)
{
+ fileSystemPath = WebInspector.IsolatedFileSystem.normalizePath(fileSystemPath);
var isolatedFileSystem = this._fileSystems[fileSystemPath];
delete this._fileSystems[fileSystemPath];
if (isolatedFileSystem) {