Bug 1454910 - Replaces the unicode-url stub with an actual unicode-url shim in the Developer Tools r=nchevobbe
authorZhang Junzhi <zjz@zjz.name>
Thu, 03 May 2018 13:33:47 +0800
changeset 473052 84ecf1c84c3f1d4ff79886836f0df827b2551189
parent 473051 d462d502c26b686ce624da318ee6959b6025f169
child 473053 6e73121c7b6980bb182b541bf9e5915af6d78c00
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1454910
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1454910 - Replaces the unicode-url stub with an actual unicode-url shim in the Developer Tools r=nchevobbe MozReview-Commit-ID: vWJPYgc4uw
devtools/client/netmonitor/package.json
devtools/client/netmonitor/webpack.config.js
devtools/client/shared/unicode-url.js
devtools/client/shared/webpack/shims/unicode-url-stub.js
devtools/client/webconsole/package.json
devtools/client/webconsole/webpack.config.js
--- a/devtools/client/netmonitor/package.json
+++ b/devtools/client/netmonitor/package.json
@@ -7,18 +7,18 @@
   "description": "Network monitor in developer tools",
   "dependencies": {
     "babel-plugin-transform-flow-strip-types": "^6.22.0",
     "babel-plugin-transform-react-jsx": "^6.24.1",
     "babel-plugin-transform-object-rest-spread": "^6.26.0",
     "codemirror": "^5.24.2",
     "devtools-config": "=0.0.12",
     "devtools-contextmenu": "=0.0.3",
-    "devtools-launchpad": "^0.0.117",
-    "devtools-modules": "=0.0.32",
+    "devtools-launchpad": "^0.0.119",
+    "devtools-modules": "=0.0.35",
     "devtools-source-editor": "=0.0.3",
     "file-loader": "^1.1.6",
     "jszip": "^3.1.3",
     "react": "=16.2.0",
     "react-dom": "=16.2.0",
     "react-prop-types": "=0.4.0",
     "react-redux": "=5.0.6",
     "redux": "^3.7.2",
--- a/devtools/client/netmonitor/webpack.config.js
+++ b/devtools/client/netmonitor/webpack.config.js
@@ -83,17 +83,17 @@ let webpackConfig = {
       "devtools/client/shared/vendor/jszip": "jszip",
 
       "devtools/client/sourceeditor/editor": "devtools-source-editor/src/source-editor",
 
       "devtools/shared/event-emitter": "devtools-modules/src/utils/event-emitter",
       "devtools/shared/fronts/timeline": path.join(__dirname, "../../client/shared/webpack/shims/fronts-timeline-shim"),
       "devtools/shared/platform/clipboard": path.join(__dirname, "../../client/shared/webpack/shims/platform-clipboard-stub"),
       "devtools/client/netmonitor/src/utils/firefox/open-request-in-tab": path.join(__dirname, "src/utils/open-request-in-tab"),
-      "devtools/client/shared/unicode-url": path.join(__dirname, "../../client/shared/webpack/shims/unicode-url-stub"),
+      "devtools/client/shared/unicode-url": "./node_modules/devtools-modules/src/unicode-url",
 
       // Locales need to be explicitly mapped to the en-US subfolder
       "devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
       "devtools/shared/locales": path.join(__dirname, "../../shared/locales/en-US"),
       "devtools/startup/locales": path.join(__dirname, "../../shared/locales/en-US"),
       "toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
 
       // Unless a path explicitly needs to be rewritten or shimmed, all devtools paths can
--- a/devtools/client/shared/unicode-url.js
+++ b/devtools/client/shared/unicode-url.js
@@ -1,21 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
-// This file is a chrome-API-dependent version of the module
-// devtools/client/shared/webpack/shims/unicode-url-stub.js, so that it can
-// take advantage of utilizing chrome APIs. But because of this, it isn't
-// intended to be used in Chrome-API-free applications, such as the Launchpad.
+// This file is a chrome-API-dependent version of the file
+// packages/devtools-modules/src/unicode-url.js at
+// https://github.com/devtools-html/devtools-core, so that this
+// chrome-API-dependent version can take advantage of utilizing chrome APIs. But
+// because of this, it isn't intended to be used in Chrome-API-free
+// applications, such as the Launchpad.
 //
 // Please keep in mind that if the feature in this file has changed, don't
-// forget to also change that accordingly in
-// devtools/client/shared/webpack/shims/unicode-url-stub.js.
+// forget to also change that accordingly in the file
+// packages/devtools-modules/src/unicode-url.js at
+// https://github.com/devtools-html/devtools-core
 
 const { Cc, Ci } = require("chrome");
 const idnService =
         Cc["@mozilla.org/network/idn-service;1"].getService(Ci.nsIIDNService);
 
 /**
  * Gets a readble Unicode hostname from a hostname.
  *
deleted file mode 100644
--- a/devtools/client/shared/webpack/shims/unicode-url-stub.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// TODO This file aims to implement a Chrome-API-free replacement for
-// devtools/client/shared/unicode-url.js, so that it can be used in the
-// Launchpad.
-//
-// Currently this is just a dummpy mock of
-// devtools/client/shared/unicode-url.js, no actual functionaly involved.
-// Eventually we'll want to implement it. Once implemented, we should keep the
-// feature the same as devtools/client/shared/unicode-url.js.
-
-"use strict";
-
-function getUnicodeHostname(hostname) {
-  return hostname;
-}
-
-function getUnicodeUrlPath(urlPath) {
-  return urlPath;
-}
-
-function getUnicodeUrl(url) {
-  return url;
-}
-
-module.exports = {
-  getUnicodeHostname,
-  getUnicodeUrlPath,
-  getUnicodeUrl,
-};
--- a/devtools/client/webconsole/package.json
+++ b/devtools/client/webconsole/package.json
@@ -9,18 +9,18 @@
     "dev": " cross-env NODE_ENV=development node bin/dev-server"
   },
   "dependencies": {
     "babel-plugin-transform-flow-strip-types": "^6.22.0",
     "babel-plugin-transform-react-jsx": "^6.24.1",
     "babel-plugin-transform-object-rest-spread": "^6.26.0",
     "cross-env": "^3.1.3",
     "devtools-config": "0.0.12",
-    "devtools-launchpad": "^0.0.117",
-    "devtools-modules": "0.0.31",
+    "devtools-launchpad": "^0.0.119",
+    "devtools-modules": "0.0.35",
     "file-loader": "^1.1.6",
     "netmonitor": "file:../netmonitor",
     "raw-loader": "^0.5.1",
     "react": "=16.2.0",
     "react-dom": "=16.2.0",
     "react-prop-types": "=0.4.0",
     "react-redux": "=5.0.6",
     "redux": "^3.7.2",
--- a/devtools/client/webconsole/webpack.config.js
+++ b/devtools/client/webconsole/webpack.config.js
@@ -87,17 +87,17 @@ webpackConfig.resolve = {
     "devtools/client/shared/vendor/reselect": "reselect",
 
     "resource://gre/modules/AppConstants.jsm": path.join(__dirname, "../../client/shared/webpack/shims/app-constants-stub"),
 
     "devtools/client/framework/devtools": path.join(__dirname, "../../client/shared/webpack/shims/framework-devtools-shim"),
     "devtools/client/framework/menu": "devtools-modules/src/menu",
     "devtools/client/sourceeditor/editor": "devtools-source-editor/src/source-editor",
 
-    "devtools/client/shared/unicode-url": path.join(__dirname, "../../client/shared/webpack/shims/unicode-url-stub"),
+    "devtools/client/shared/unicode-url": "./node_modules/devtools-modules/src/unicode-url",
     "devtools/client/shared/zoom-keys": "devtools-modules/src/zoom-keys",
 
     "devtools/shared/fronts/timeline": path.join(__dirname, "../../client/shared/webpack/shims/fronts-timeline-shim"),
     "devtools/shared/event-emitter": "devtools-modules/src/utils/event-emitter",
     "devtools/shared/client/debugger-client": path.join(__dirname, "test/fixtures/DebuggerClient"),
     "devtools/shared/platform/clipboard": path.join(__dirname, "../../client/shared/webpack/shims/platform-clipboard-stub"),
     "devtools/shared/platform/stack": path.join(__dirname, "../../client/shared/webpack/shims/platform-stack-stub"),