Skip to content

Commit

Permalink
Bug 1790912 - Migrate js/ductwork/debugger to devtools/platform. r=oc…
Browse files Browse the repository at this point in the history
…hameau

This gecko integration code is better managed with the other devtools platform
hook code. To simplify resolving the JSM and avoiding issues around restricted
use of eval in chrome, I also reset the DIST_SUBDIR config and run the xpcshell
tests without a firefox-appdir. The test works on Android these days, so
re-enable it on that platform.

Differential Revision: https://phabricator.services.mozilla.com/D157522
  • Loading branch information
moztcampbell committed Sep 25, 2022
1 parent 410e8df commit 7a57865
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 58 deletions.
1 change: 0 additions & 1 deletion .eslintrc-test-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const extraXpcshellTestPaths = [
"intl/benchmarks/",
"intl/l10n/test/",
"ipc/testshell/tests/",
"js/ductwork/debugger/tests/",
"memory/replace/dmd/test/",
"netwerk/test/httpserver/test/",
"testing/modules/tests/xpcshell/",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions devtools/platform/components.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ Classes = [
'type': 'mozilla::jsinspector::nsJSInspector',
'headers': ['/devtools/platform/nsJSInspector.h'],
},
{
'cid': '{0365cbd5-d46e-4e94-a39f-83b63cd1a963}',
'contract_ids': ['@mozilla.org/jsdebugger;1'],
'type': 'mozilla::jsdebugger::JSDebugger',
'headers': ['/devtools/platform/JSDebugger.h'],
},
]
File renamed without changes.
12 changes: 11 additions & 1 deletion devtools/platform/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,27 @@
XPCSHELL_TESTS_MANIFESTS += ["tests/xpcshell/xpcshell.ini"]

XPIDL_SOURCES += [
"IJSDebugger.idl",
"nsIJSInspector.idl",
]

XPIDL_MODULE = "jsinspector"
XPIDL_MODULE = "jsdevtools"

SOURCES += [
"JSDebugger.cpp",
"nsJSInspector.cpp",
]

XPCOM_MANIFESTS += [
"components.conf",
]

EXTRA_JS_MODULES += [
"jsdebugger.jsm",
]

# The /devtools/moz.build opted in to treatment of devtools as a browser
# component, but for this platform integration code it is simpler not too.
DIST_SUBDIR = ""

FINAL_LIBRARY = "xul"
File renamed without changes.
4 changes: 2 additions & 2 deletions devtools/platform/tests/xpcshell/xpcshell.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[DEFAULT]
tags = devtools
firefox-appdir = browser
skip-if = toolkit == 'android'
head = head_dbg.js

[test_nsjsinspector.js]
[test_nativewrappers.js]
14 changes: 0 additions & 14 deletions js/ductwork/debugger/components.conf

This file was deleted.

30 changes: 0 additions & 30 deletions js/ductwork/debugger/moz.build

This file was deleted.

7 changes: 0 additions & 7 deletions js/ductwork/debugger/tests/xpcshell.ini

This file was deleted.

2 changes: 1 addition & 1 deletion js/src/devtools/rootAnalysis/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -e
cd $SOURCE
./mach configure
./mach build export
./mach build -X nsprpub mfbt memory memory/mozalloc modules/zlib mozglue js/src xpcom/glue js/ductwork/debugger js/xpconnect/loader js/xpconnect/wrappers js/xpconnect/src
./mach build -X nsprpub mfbt memory memory/mozalloc modules/zlib mozglue js/src xpcom/glue js/xpconnect/loader js/xpconnect/wrappers js/xpconnect/src
status=$?
echo "[[[[ build.js complete, exit code $status ]]]]"
exit $status
1 change: 0 additions & 1 deletion toolkit/toolkit.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ DIRS += [
'/toolkit/library',
'/services',
'/startupcache',
'/js/ductwork/debugger',
'/other-licenses/snappy',
]

Expand Down
2 changes: 1 addition & 1 deletion tools/esmify/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@
"resource://gre/modules/handlers/HandlerList.jsm":
"uriloader/exthandler/HandlerList.jsm",
"resource://gre/modules/jsdebugger.jsm":
"js/ductwork/debugger/jsdebugger.jsm",
"devtools/platform/jsdebugger.jsm",
"resource://gre/modules/kvstore.jsm":
"toolkit/components/kvstore/kvstore.jsm",
"resource://gre/modules/lz4.js": "toolkit/components/lz4/lz4.js",
Expand Down

0 comments on commit 7a57865

Please sign in to comment.