From efe328f1b2154bc66d8ec44d53c28f551843f69a Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 21 Sep 2015 12:04:18 -0500 Subject: [PATCH] Bug 912121 - Rewrite require / import to match source tree. rs=devtools In a following patch, all DevTools moz.build files will use DevToolsModules to install JS modules at a path that corresponds directly to their source tree location. Here we rewrite all require and import calls to match the new location that these files are installed to. --HG-- extra : commitid : F2ItGm8ptRz extra : rebase_source : b082fe4bf77e22e297e303fc601165ceff1c4cbc --- addon-sdk/source/lib/dev/debuggee.js | 2 +- addon-sdk/source/lib/dev/toolbox.js | 2 +- addon-sdk/source/lib/dev/utils.js | 4 +- addon-sdk/source/lib/sdk/addon/runner.js | 2 +- .../source/lib/sdk/console/plain-text.js | 2 +- addon-sdk/source/lib/sdk/loader/sandbox.js | 2 +- addon-sdk/source/lib/toolkit/loader.js | 2 +- .../addons/page-mod-debugger-post/main.js | 4 +- .../test/addons/page-mod-debugger-pre/main.js | 4 +- addon-sdk/source/test/test-page-mod-debug.js | 2 +- addon-sdk/test/head.js | 2 +- b2g/chrome/content/desktop.js | 10 +- b2g/chrome/content/devtools/debugger.js | 6 +- b2g/chrome/content/devtools/hud.js | 6 +- b2g/components/DebuggerActors.js | 2 +- b2g/simulator/bootstrap.js | 2 +- b2g/simulator/lib/main.js | 2 +- b2g/simulator/lib/simulator-process.js | 2 +- browser/base/content/browser.js | 20 +- browser/base/content/nsContextMenu.js | 2 +- browser/components/customizableui/logging.js | 2 +- .../components/downloads/DownloadsCommon.jsm | 2 +- .../extensions/ext-browserAction.js | 2 +- .../components/loop/modules/LoopContacts.jsm | 4 +- browser/components/loop/modules/LoopRooms.jsm | 2 +- .../components/loop/modules/LoopStorage.jsm | 2 +- .../loop/modules/MozLoopService.jsm | 2 +- .../components/sessionstore/SessionFile.jsm | 2 +- .../components/sessionstore/SessionSaver.jsm | 2 +- .../sessionstore/SessionStorage.jsm | 2 +- .../components/sessionstore/SessionStore.jsm | 4 +- browser/components/sessionstore/TabState.jsm | 2 +- .../sessionstore/nsSessionStartup.js | 2 +- browser/components/uitour/UITour.jsm | 2 +- .../animation-controller.js | 8 +- .../animationinspector/animation-panel.js | 2 +- .../client/animationinspector/components.js | 4 +- devtools/client/animationinspector/moz.build | 4 +- .../test/browser_animation_timeline_header.js | 4 +- .../client/animationinspector/test/head.js | 12 +- .../test/unit/test_findOptimalTimeInterval.js | 4 +- .../test/unit/test_timeScale.js | 4 +- devtools/client/app-manager/app-projects.js | 6 +- devtools/client/app-manager/app-validator.js | 2 +- .../client/app-manager/builtin-adb-store.js | 4 +- .../client/app-manager/connection-store.js | 4 +- .../app-manager/content/connection-footer.js | 18 +- devtools/client/app-manager/content/device.js | 16 +- devtools/client/app-manager/content/index.js | 10 +- .../app-manager/content/manifest-editor.js | 2 +- .../client/app-manager/content/projects.js | 16 +- devtools/client/app-manager/content/utils.js | 4 +- devtools/client/app-manager/device-store.js | 4 +- devtools/client/app-manager/moz.build | 4 +- .../client/app-manager/simulators-store.js | 4 +- devtools/client/app-manager/test/head.js | 8 +- .../app-manager/test/test_app_validator.html | 4 +- .../test/test_connection_store.html | 8 +- .../app-manager/test/test_device_store.html | 8 +- .../app-manager/test/test_projects_store.html | 4 +- .../test/test_remain_connected.html | 12 +- .../app-manager/test/test_template.html | 6 +- devtools/client/app-manager/webapps-store.js | 6 +- .../client/canvasdebugger/canvasdebugger.js | 16 +- devtools/client/canvasdebugger/moz.build | 4 +- devtools/client/canvasdebugger/panel.js | 4 +- devtools/client/canvasdebugger/test/head.js | 14 +- .../test/browser_cmd_highlight_02.js | 2 +- .../commandline/test/browser_cmd_settings.js | 2 +- devtools/client/commandline/test/head.js | 6 +- devtools/client/commandline/test/helpers.js | 4 +- .../content/actions/event-listeners.js | 2 +- .../client/debugger/content/actions/moz.build | 8 + devtools/client/debugger/content/moz.build | 16 ++ .../debugger/content/reducers/moz.build | 9 + devtools/client/debugger/content/utils.js | 4 +- .../content/views/event-listeners-view.js | 2 +- .../client/debugger/content/views/moz.build | 8 + devtools/client/debugger/debugger-commands.js | 2 +- .../client/debugger/debugger-controller.js | 38 ++-- devtools/client/debugger/debugger-view.js | 6 +- devtools/client/debugger/moz.build | 27 +-- devtools/client/debugger/panel.js | 4 +- .../mochitest/browser_dbg_chrome-debugging.js | 2 +- .../test/mochitest/browser_dbg_parser-01.js | 2 +- .../test/mochitest/browser_dbg_parser-02.js | 2 +- .../test/mochitest/browser_dbg_parser-03.js | 2 +- .../test/mochitest/browser_dbg_parser-04.js | 2 +- .../test/mochitest/browser_dbg_parser-05.js | 2 +- .../test/mochitest/browser_dbg_parser-06.js | 2 +- .../test/mochitest/browser_dbg_parser-07.js | 2 +- .../test/mochitest/browser_dbg_parser-08.js | 2 +- .../test/mochitest/browser_dbg_parser-09.js | 2 +- .../test/mochitest/browser_dbg_parser-10.js | 2 +- .../debugger/test/mochitest/code_ugly-4.js | 2 +- .../client/debugger/test/mochitest/head.js | 20 +- devtools/client/definitions.js | 40 ++-- devtools/client/devtools-clhandler.js | 12 +- devtools/client/eyedropper/commands.js | 4 +- devtools/client/eyedropper/eyedropper.js | 8 +- devtools/client/eyedropper/moz.build | 4 +- devtools/client/eyedropper/test/head.js | 2 +- .../client/fontinspector/font-inspector.js | 2 +- .../browser_fontinspector_theme-change.js | 2 +- devtools/client/framework/ToolboxProcess.jsm | 6 +- devtools/client/framework/connect/connect.js | 10 +- devtools/client/framework/gDevTools.jsm | 18 +- devtools/client/framework/moz.build | 9 +- devtools/client/framework/selection.js | 4 +- devtools/client/framework/sidebar.js | 4 +- devtools/client/framework/target.js | 4 +- .../framework/test/browser_devtools_api.js | 2 +- .../framework/test/browser_keybindings_02.js | 2 +- .../framework/test/browser_keybindings_03.js | 2 +- .../test/browser_toolbox_custom_host.js | 2 +- .../test/browser_toolbox_highlight.js | 2 +- .../framework/test/browser_toolbox_hosts.js | 2 +- .../test/browser_toolbox_hosts_size.js | 2 +- .../test/browser_toolbox_minimize.js | 2 +- .../framework/test/browser_toolbox_raise.js | 2 +- .../framework/test/browser_toolbox_sidebar.js | 2 +- .../test/browser_toolbox_sidebar_events.js | 2 +- .../browser_toolbox_sidebar_existing_tabs.js | 2 +- .../browser_toolbox_sidebar_overflow_menu.js | 2 +- .../browser_toolbox_tabsswitch_shortcuts.js | 2 +- .../framework/test/browser_toolbox_toggle.js | 204 +++++++++--------- .../browser_toolbox_tool_remote_reopen.js | 2 +- .../test/browser_toolbox_transport_events.js | 2 +- .../browser_toolbox_window_reload_target.js | 2 +- .../test/browser_toolbox_window_shortcuts.js | 2 +- .../browser_toolbox_window_title_changes.js | 2 +- .../client/framework/test/browser_two_tabs.js | 2 +- devtools/client/framework/test/head.js | 2 +- devtools/client/framework/test/shared-head.js | 12 +- .../framework/toolbox-highlighter-utils.js | 2 +- devtools/client/framework/toolbox-hosts.js | 4 +- devtools/client/framework/toolbox-options.js | 4 +- .../framework/toolbox-process-window.js | 12 +- devtools/client/framework/toolbox.js | 32 +-- .../client/inspector/inspector-commands.js | 2 +- devtools/client/inspector/inspector-panel.js | 14 +- devtools/client/inspector/moz.build | 4 +- devtools/client/inspector/selector-search.js | 4 +- devtools/client/inspector/test/head.js | 8 +- devtools/client/layoutview/test/head.js | 10 +- devtools/client/layoutview/view.js | 8 +- devtools/client/main.js | 16 +- devtools/client/markupview/html-editor.js | 4 +- devtools/client/markupview/markup-view.js | 20 +- devtools/client/markupview/moz.build | 4 +- devtools/client/markupview/test/head.js | 12 +- devtools/client/memory/controller.js | 4 +- devtools/client/memory/modules/census-view.js | 6 +- devtools/client/memory/modules/moz.build | 8 + devtools/client/memory/moz.build | 9 +- devtools/client/memory/panel.js | 2 +- devtools/client/memory/test/mochitest/head.js | 2 +- .../test/mochitest/test_census-view-01.html | 4 +- devtools/client/moz.build | 6 +- .../client/netmonitor/har/har-automation.js | 6 +- devtools/client/netmonitor/har/har-builder.js | 4 +- .../client/netmonitor/har/har-collector.js | 2 +- devtools/client/netmonitor/har/moz.build | 4 +- .../client/netmonitor/har/toolbox-overlay.js | 2 +- devtools/client/netmonitor/moz.build | 4 +- .../netmonitor/netmonitor-controller.js | 28 +-- devtools/client/netmonitor/netmonitor-view.js | 4 +- devtools/client/netmonitor/panel.js | 4 +- devtools/client/netmonitor/test/head.js | 14 +- devtools/client/performance/modules/global.js | 2 +- .../performance/modules/logic/frame-utils.js | 2 +- .../performance/modules/logic/marker-utils.js | 8 +- .../performance/modules/logic/moz.build | 13 ++ .../performance/modules/logic/telemetry.js | 6 +- .../performance/modules/logic/tree-model.js | 4 +- .../modules/logic/waterfall-utils.js | 2 +- .../client/performance/modules/markers.js | 4 +- devtools/client/performance/modules/moz.build | 14 ++ .../performance/modules/widgets/graphs.js | 24 +-- .../modules/widgets/marker-details.js | 4 +- .../modules/widgets/marker-view.js | 6 +- .../modules/widgets/markers-overview.js | 16 +- .../performance/modules/widgets/moz.build | 13 ++ .../performance/modules/widgets/tree-view.js | 6 +- .../modules/widgets/waterfall-ticks.js | 4 +- devtools/client/performance/moz.build | 24 +-- devtools/client/performance/panel.js | 2 +- .../performance/performance-controller.js | 60 +++--- .../test/browser_perf-events-calltree.js | 2 +- .../test/browser_perf-jit-view-02.js | 2 +- .../test/browser_perf-theme-toggle-01.js | 2 +- .../test/browser_profiler_tree-abstract-01.js | 4 +- .../test/browser_profiler_tree-abstract-02.js | 4 +- .../test/browser_profiler_tree-abstract-03.js | 4 +- .../test/browser_profiler_tree-abstract-04.js | 4 +- .../test/browser_profiler_tree-view-01.js | 4 +- .../test/browser_profiler_tree-view-02.js | 6 +- .../test/browser_profiler_tree-view-03.js | 4 +- .../test/browser_profiler_tree-view-04.js | 6 +- .../test/browser_profiler_tree-view-05.js | 4 +- .../test/browser_profiler_tree-view-06.js | 4 +- .../test/browser_profiler_tree-view-07.js | 4 +- .../test/browser_profiler_tree-view-08.js | 6 +- .../test/browser_profiler_tree-view-09.js | 6 +- .../test/browser_profiler_tree-view-10.js | 4 +- .../test/browser_profiler_tree-view-11.js | 2 +- .../test/browser_timeline-filters-01.js | 2 +- .../browser_timeline-waterfall-background.js | 2 +- .../browser_timeline-waterfall-generic.js | 2 +- .../browser_timeline-waterfall-sidebar.js | 4 +- devtools/client/performance/test/head.js | 16 +- devtools/client/performance/test/unit/head.js | 6 +- .../test/unit/test_frame-utils-01.js | 2 +- .../test/unit/test_frame-utils-02.js | 2 +- .../test/unit/test_jit-graph-data.js | 4 +- .../test/unit/test_jit-model-01.js | 2 +- .../test/unit/test_jit-model-02.js | 2 +- .../test/unit/test_marker-blueprint.js | 2 +- .../test/unit/test_marker-utils.js | 4 +- .../test_perf-utils-allocations-to-samples.js | 2 +- .../test/unit/test_profiler-categories.js | 2 +- .../test/unit/test_tree-model-01.js | 2 +- .../test/unit/test_tree-model-02.js | 2 +- .../test/unit/test_tree-model-03.js | 2 +- .../test/unit/test_tree-model-04.js | 2 +- .../test/unit/test_tree-model-05.js | 2 +- .../test/unit/test_tree-model-06.js | 2 +- .../test/unit/test_tree-model-07.js | 4 +- .../test/unit/test_tree-model-08.js | 6 +- .../test/unit/test_tree-model-09.js | 4 +- .../test/unit/test_tree-model-10.js | 2 +- .../test/unit/test_tree-model-11.js | 2 +- .../test/unit/test_tree-model-12.js | 2 +- .../test/unit/test_tree-model-13.js | 2 +- .../unit/test_tree-model-allocations-01.js | 4 +- .../unit/test_tree-model-allocations-02.js | 4 +- .../unit/test_waterfall-utils-collapse-01.js | 2 +- .../unit/test_waterfall-utils-collapse-02.js | 2 +- .../unit/test_waterfall-utils-collapse-03.js | 2 +- .../unit/test_waterfall-utils-collapse-04.js | 2 +- .../chrome/content/projecteditor-loader.js | 4 +- devtools/client/projecteditor/lib/editors.js | 2 +- .../projecteditor/lib/helpers/file-picker.js | 2 +- .../client/projecteditor/lib/helpers/l10n.js | 2 +- .../projecteditor/lib/helpers/moz.build | 13 ++ .../projecteditor/lib/helpers/prompts.js | 2 +- devtools/client/projecteditor/lib/moz.build | 19 ++ .../plugins/app-manager/app-project-editor.js | 2 +- .../lib/plugins/app-manager/moz.build | 10 + .../lib/plugins/app-manager/plugin.js | 2 +- .../lib/plugins/delete/delete.js | 6 +- .../lib/plugins/delete/moz.build | 9 + .../projecteditor/lib/plugins/dirty/dirty.js | 2 +- .../projecteditor/lib/plugins/dirty/moz.build | 9 + .../lib/plugins/image-view/image-editor.js | 2 +- .../lib/plugins/image-view/moz.build | 10 + .../lib/plugins/image-view/plugin.js | 2 +- .../lib/plugins/logging/logging.js | 2 +- .../lib/plugins/logging/moz.build | 9 + .../projecteditor/lib/plugins/moz.build | 21 ++ .../projecteditor/lib/plugins/new/moz.build | 9 + .../projecteditor/lib/plugins/new/new.js | 4 +- .../lib/plugins/rename/moz.build | 9 + .../lib/plugins/rename/rename.js | 4 +- .../projecteditor/lib/plugins/save/moz.build | 9 + .../projecteditor/lib/plugins/save/save.js | 6 +- .../lib/plugins/status-bar/moz.build | 9 + .../lib/plugins/status-bar/plugin.js | 2 +- devtools/client/projecteditor/lib/project.js | 4 +- .../client/projecteditor/lib/projecteditor.js | 38 ++-- devtools/client/projecteditor/lib/shells.js | 4 +- .../client/projecteditor/lib/stores/local.js | 6 +- .../client/projecteditor/lib/stores/moz.build | 11 + .../projecteditor/lib/stores/resource.js | 2 +- devtools/client/projecteditor/lib/tree.js | 4 +- devtools/client/projecteditor/moz.build | 65 +----- devtools/client/projecteditor/test/head.js | 10 +- devtools/client/promisedebugger/moz.build | 4 +- .../promisedebugger/promise-controller.js | 6 +- devtools/client/responsivedesign/moz.build | 15 +- .../responsivedesign/responsivedesign.jsm | 16 +- devtools/client/responsivedesign/test/head.js | 6 +- devtools/client/scratchpad/moz.build | 9 +- .../client/scratchpad/scratchpad-panel.js | 2 +- devtools/client/scratchpad/scratchpad.js | 34 +-- .../test/browser_scratchpad_close_toolbox.js | 2 +- .../browser_scratchpad_edit_ui_updates.js | 2 +- .../browser_scratchpad_wrong_window_focus.js | 4 +- devtools/client/scratchpad/test/head.js | 6 +- devtools/client/shadereditor/moz.build | 4 +- devtools/client/shadereditor/panel.js | 4 +- devtools/client/shadereditor/shadereditor.js | 16 +- devtools/client/shadereditor/test/head.js | 14 +- devtools/client/shared/AppCacheUtils.jsm | 2 +- devtools/client/shared/DeveloperToolbar.jsm | 14 +- devtools/client/shared/Jsbeautify.jsm | 6 +- devtools/client/shared/Parser.jsm | 4 +- devtools/client/shared/autocomplete-popup.js | 4 +- devtools/client/shared/browser-loader.js | 6 +- devtools/client/shared/devices.js | 4 +- devtools/client/shared/doorhanger.js | 2 +- devtools/client/shared/frame-script-utils.js | 2 +- devtools/client/shared/inplace-editor.js | 2 +- devtools/client/shared/moz.build | 49 +---- devtools/client/shared/observable-object.js | 2 +- devtools/client/shared/options-view.js | 2 +- devtools/client/shared/redux/create-store.js | 2 +- .../client/shared/redux/middleware/moz.build | 11 + devtools/client/shared/redux/moz.build | 14 +- devtools/client/shared/redux/reducers.js | 2 +- devtools/client/shared/source-utils.js | 2 +- devtools/client/shared/telemetry.js | 2 +- .../client/shared/test/browser_css_color.js | 2 +- .../shared/test/browser_cubic-bezier-01.js | 2 +- .../shared/test/browser_cubic-bezier-02.js | 4 +- .../shared/test/browser_cubic-bezier-03.js | 4 +- .../shared/test/browser_cubic-bezier-04.js | 4 +- .../shared/test/browser_cubic-bezier-05.js | 4 +- .../shared/test/browser_cubic-bezier-06.js | 4 +- .../client/shared/test/browser_devices.js | 2 +- .../shared/test/browser_filter-editor-01.js | 2 +- .../shared/test/browser_filter-editor-02.js | 4 +- .../shared/test/browser_filter-editor-03.js | 2 +- .../shared/test/browser_filter-editor-04.js | 2 +- .../shared/test/browser_filter-editor-05.js | 2 +- .../shared/test/browser_filter-editor-06.js | 4 +- .../shared/test/browser_filter-editor-07.js | 4 +- .../shared/test/browser_filter-editor-08.js | 2 +- .../shared/test/browser_filter-editor-09.js | 2 +- .../shared/test/browser_filter-editor-10.js | 2 +- .../shared/test/browser_filter-presets-01.js | 2 +- .../shared/test/browser_filter-presets-02.js | 2 +- .../shared/test/browser_filter-presets-03.js | 2 +- .../shared/test/browser_flame-graph-01.js | 2 +- .../shared/test/browser_flame-graph-02.js | 2 +- .../shared/test/browser_flame-graph-03a.js | 2 +- .../shared/test/browser_flame-graph-03b.js | 2 +- .../shared/test/browser_flame-graph-03c.js | 2 +- .../shared/test/browser_flame-graph-04.js | 8 +- .../test/browser_flame-graph-utils-01.js | 4 +- .../test/browser_flame-graph-utils-02.js | 4 +- .../test/browser_flame-graph-utils-03.js | 6 +- .../test/browser_flame-graph-utils-04.js | 6 +- .../test/browser_flame-graph-utils-05.js | 2 +- .../test/browser_flame-graph-utils-06.js | 4 +- .../test/browser_flame-graph-utils-hash.js | 2 +- .../client/shared/test/browser_graphs-01.js | 2 +- .../client/shared/test/browser_graphs-02.js | 2 +- .../client/shared/test/browser_graphs-03.js | 2 +- .../client/shared/test/browser_graphs-04.js | 2 +- .../client/shared/test/browser_graphs-05.js | 2 +- .../client/shared/test/browser_graphs-06.js | 2 +- .../client/shared/test/browser_graphs-07a.js | 2 +- .../client/shared/test/browser_graphs-07b.js | 2 +- .../client/shared/test/browser_graphs-07c.js | 2 +- .../client/shared/test/browser_graphs-07d.js | 2 +- .../client/shared/test/browser_graphs-07e.js | 2 +- .../client/shared/test/browser_graphs-08.js | 2 +- .../client/shared/test/browser_graphs-09a.js | 2 +- .../client/shared/test/browser_graphs-09b.js | 2 +- .../client/shared/test/browser_graphs-09c.js | 2 +- .../client/shared/test/browser_graphs-09d.js | 2 +- .../client/shared/test/browser_graphs-09e.js | 2 +- .../client/shared/test/browser_graphs-09f.js | 2 +- .../client/shared/test/browser_graphs-10a.js | 2 +- .../client/shared/test/browser_graphs-10b.js | 2 +- .../client/shared/test/browser_graphs-10c.js | 2 +- .../client/shared/test/browser_graphs-11a.js | 2 +- .../client/shared/test/browser_graphs-11b.js | 2 +- .../client/shared/test/browser_graphs-12.js | 6 +- .../client/shared/test/browser_graphs-13.js | 2 +- .../client/shared/test/browser_graphs-14.js | 2 +- .../client/shared/test/browser_graphs-15.js | 2 +- .../client/shared/test/browser_graphs-16.js | 2 +- .../shared/test/browser_inplace-editor-01.js | 2 +- .../shared/test/browser_inplace-editor-02.js | 2 +- .../test/browser_layoutHelpers-getBoxQuads.js | 2 +- .../shared/test/browser_layoutHelpers.js | 2 +- .../client/shared/test/browser_mdn-docs-01.js | 4 +- .../client/shared/test/browser_mdn-docs-02.js | 4 +- .../client/shared/test/browser_mdn-docs-03.js | 2 +- .../client/shared/test/browser_num-l10n.js | 2 +- .../shared/test/browser_observableobject.js | 4 +- .../shared/test/browser_options-view-01.js | 2 +- .../shared/test/browser_outputparser.js | 2 +- devtools/client/shared/test/browser_poller.js | 2 +- .../client/shared/test/browser_prefs-01.js | 2 +- .../client/shared/test/browser_prefs-02.js | 2 +- .../client/shared/test/browser_spectrum.js | 2 +- .../shared/test/browser_tableWidget_basic.js | 2 +- ...rowser_tableWidget_keyboard_interaction.js | 2 +- .../browser_tableWidget_mouse_interaction.js | 2 +- .../browser_telemetry_button_eyedropper.js | 2 +- .../shared/test/browser_templater_basic.js | 2 +- devtools/client/shared/test/browser_theme.js | 2 +- ...browser_toolbar_webconsole_errors_count.js | 2 +- .../shared/test/browser_treeWidget_basic.js | 2 +- ...browser_treeWidget_keyboard_interaction.js | 2 +- .../browser_treeWidget_mouse_interaction.js | 2 +- devtools/client/shared/test/head.js | 18 +- .../client/shared/test/test-actor-registry.js | 4 +- devtools/client/shared/test/test-actor.js | 2 +- ...iablesView_filtering-without-controller.js | 2 +- .../test_VariablesView_getString_promise.js | 2 +- .../shared/test/unit/test_advanceValidate.js | 4 +- .../test/unit/test_attribute-parsing-01.js | 4 +- .../test/unit/test_attribute-parsing-02.js | 4 +- .../shared/test/unit/test_bezierCanvas.js | 4 +- .../shared/test/unit/test_cubicBezier.js | 4 +- .../client/shared/test/unit/test_undoStack.js | 2 +- devtools/client/shared/theme-switching.js | 4 +- devtools/client/shared/theme.js | 2 +- devtools/client/shared/vendor/moz.build | 17 +- .../shared/widgets/AbstractTreeItem.jsm | 6 +- .../client/shared/widgets/BarGraphWidget.js | 4 +- .../shared/widgets/BreadcrumbsWidget.jsm | 4 +- devtools/client/shared/widgets/Chart.jsm | 4 +- .../shared/widgets/CubicBezierWidget.js | 4 +- .../client/shared/widgets/FastListWidget.js | 4 +- .../client/shared/widgets/FilterWidget.js | 8 +- devtools/client/shared/widgets/FlameGraph.js | 18 +- devtools/client/shared/widgets/Graphs.js | 11 +- .../client/shared/widgets/GraphsWorker.js | 2 +- .../client/shared/widgets/LineGraphWidget.js | 4 +- .../shared/widgets/MountainGraphWidget.js | 4 +- .../client/shared/widgets/SideMenuWidget.jsm | 4 +- .../shared/widgets/SimpleListWidget.jsm | 2 +- devtools/client/shared/widgets/Spectrum.js | 4 +- devtools/client/shared/widgets/TableWidget.js | 2 +- devtools/client/shared/widgets/Tooltip.js | 26 +-- devtools/client/shared/widgets/TreeWidget.js | 2 +- .../client/shared/widgets/VariablesView.jsm | 12 +- .../widgets/VariablesViewController.jsm | 10 +- .../client/shared/widgets/ViewHelpers.jsm | 6 +- devtools/client/shared/widgets/moz.build | 31 +++ devtools/client/sourceeditor/autocomplete.js | 4 +- .../client/sourceeditor/css-autocompleter.js | 2 +- devtools/client/sourceeditor/debugger.js | 2 +- devtools/client/sourceeditor/editor.js | 6 +- devtools/client/sourceeditor/moz.build | 4 +- .../test/browser_css_autocompletion.js | 4 +- .../sourceeditor/test/browser_css_getInfo.js | 2 +- .../test/browser_css_statemachine.js | 2 +- .../browser_editor_autocomplete_events.js | 2 +- devtools/client/sourceeditor/test/head.js | 6 +- devtools/client/storage/moz.build | 4 +- devtools/client/storage/panel.js | 4 +- devtools/client/storage/test/head.js | 8 +- devtools/client/storage/ui.js | 12 +- devtools/client/styleeditor/StyleEditorUI.jsm | 16 +- .../client/styleeditor/StyleEditorUtil.jsm | 4 +- .../client/styleeditor/StyleSheetEditor.jsm | 12 +- devtools/client/styleeditor/moz.build | 11 +- .../styleeditor/styleeditor-commands.js | 2 +- .../client/styleeditor/styleeditor-panel.js | 6 +- .../browser_styleeditor_sourcemap_watching.js | 2 +- .../test/browser_styleeditor_sv_resize.js | 2 +- devtools/client/styleeditor/test/head.js | 8 +- devtools/client/styleeditor/utils.js | 2 +- .../client/styleinspector/computed-view.js | 16 +- .../client/styleinspector/computedview.xhtml | 4 +- .../styleinspector/css-parsing-utils.js | 2 +- .../client/styleinspector/cssruleview.xhtml | 4 +- devtools/client/styleinspector/moz.build | 4 +- devtools/client/styleinspector/rule-view.js | 20 +- .../styleinspector/style-inspector-menu.js | 4 +- .../style-inspector-overlays.js | 8 +- .../client/styleinspector/style-inspector.js | 10 +- .../test/browser_computedview_getNodeInfo.js | 2 +- ...owser_computedview_matched-selectors_01.js | 2 +- .../browser_computedview_media-queries.js | 4 +- ..._ruleview_context-menu-show-mdn-docs-01.js | 2 +- ..._ruleview_context-menu-show-mdn-docs-02.js | 2 +- ..._ruleview_context-menu-show-mdn-docs-03.js | 2 +- .../browser_ruleview_user-agent-styles.js | 2 +- .../browser_styleinspector_output-parser.js | 2 +- .../styleinspector/test/doc_frame_script.js | 4 +- devtools/client/styleinspector/test/head.js | 18 +- .../test/unit/test_parseDeclarations.js | 4 +- .../test_parsePseudoClassesAndAttributes.js | 4 +- .../test/unit/test_parseSingleValue.js | 4 +- devtools/client/styleinspector/utils.js | 2 +- devtools/client/tilt/moz.build | 4 +- .../test/browser_tilt_picking_inspector.js | 2 +- devtools/client/tilt/test/head.js | 16 +- devtools/client/tilt/tilt-commands.js | 2 +- devtools/client/tilt/tilt-gl.js | 4 +- devtools/client/tilt/tilt-math.js | 2 +- devtools/client/tilt/tilt-utils.js | 2 +- devtools/client/tilt/tilt-visualizer-style.js | 2 +- devtools/client/tilt/tilt-visualizer.js | 20 +- devtools/client/tilt/tilt.js | 10 +- devtools/client/webaudioeditor/includes.js | 16 +- devtools/client/webaudioeditor/moz.build | 4 +- devtools/client/webaudioeditor/panel.js | 2 +- .../test/browser_wa_graph-markers.js | 2 +- devtools/client/webaudioeditor/test/head.js | 8 +- .../client/webaudioeditor/views/properties.js | 4 +- .../client/webconsole/console-commands.js | 2 +- devtools/client/webconsole/console-output.js | 12 +- devtools/client/webconsole/hudservice.js | 18 +- devtools/client/webconsole/moz.build | 4 +- devtools/client/webconsole/panel.js | 4 +- .../test/browser_console_consolejsm_output.js | 8 +- .../test/browser_console_open_or_focus.js | 2 +- ...ser_webconsole_autocomplete_and_selfxss.js | 2 +- ...console_bug_632347_iterators_generators.js | 2 +- .../browser_webconsole_property_provider.js | 2 +- ...rowser_webconsole_scratchpad_panel_link.js | 132 ++++++------ .../test/browser_webconsole_split.js | 2 +- devtools/client/webconsole/test/head.js | 16 +- devtools/client/webconsole/webconsole.js | 24 +-- devtools/client/webide/content/addons.js | 4 +- devtools/client/webide/content/details.js | 12 +- .../webide/content/devicepreferences.js | 8 +- .../client/webide/content/devicesettings.js | 8 +- devtools/client/webide/content/logs.js | 6 +- devtools/client/webide/content/monitor.js | 12 +- devtools/client/webide/content/newapp.js | 8 +- .../client/webide/content/permissionstable.js | 6 +- .../client/webide/content/project-listing.js | 4 +- .../client/webide/content/runtime-listing.js | 4 +- .../client/webide/content/runtimedetails.js | 8 +- devtools/client/webide/content/simulator.js | 10 +- devtools/client/webide/content/webide.js | 34 +-- devtools/client/webide/content/wifi-auth.js | 4 +- devtools/client/webide/modules/addons.js | 4 +- devtools/client/webide/modules/app-manager.js | 18 +- devtools/client/webide/modules/config-view.js | 2 +- devtools/client/webide/modules/moz.build | 19 ++ .../client/webide/modules/project-list.js | 10 +- .../client/webide/modules/runtime-list.js | 12 +- devtools/client/webide/modules/runtimes.js | 14 +- .../webide/modules/simulator-process.js | 2 +- devtools/client/webide/modules/simulators.js | 12 +- devtools/client/webide/modules/tab-store.js | 6 +- devtools/client/webide/moz.build | 16 +- devtools/client/webide/test/head.js | 8 +- .../webide/test/sidebars/test_addons.html | 6 +- .../webide/test/sidebars/test_telemetry.html | 4 +- devtools/client/webide/test/test_addons.html | 6 +- devtools/client/webide/test/test_basic.html | 2 +- devtools/client/webide/test/test_build.html | 2 +- .../client/webide/test/test_simulators.html | 12 +- .../client/webide/test/test_telemetry.html | 4 +- devtools/server/actors/addon.js | 4 +- devtools/server/actors/canvas.js | 2 +- devtools/server/actors/child-process.js | 2 +- devtools/server/actors/csscoverage.js | 4 +- devtools/server/actors/device.js | 2 +- devtools/server/actors/framerate.js | 2 +- devtools/server/actors/gcli.js | 2 +- devtools/server/actors/highlighters.js | 4 +- .../actors/highlighters/auto-refresh.js | 4 +- .../server/actors/highlighters/box-model.js | 2 +- .../actors/highlighters/css-transform.js | 2 +- .../actors/highlighters/geometry-editor.js | 2 +- devtools/server/actors/highlighters/moz.build | 20 ++ devtools/server/actors/highlighters/rect.js | 2 +- devtools/server/actors/highlighters/rulers.js | 2 +- .../actors/highlighters/utils/markup.js | 4 +- .../actors/highlighters/utils/moz.build | 9 + devtools/server/actors/inspector.js | 10 +- devtools/server/actors/layout.js | 2 +- devtools/server/actors/memory.js | 6 +- devtools/server/actors/memprof.js | 2 +- devtools/server/actors/moz.build | 59 +++++ devtools/server/actors/object.js | 2 +- .../server/actors/performance-recording.js | 6 +- devtools/server/actors/performance.js | 10 +- devtools/server/actors/pretty-print-worker.js | 4 +- devtools/server/actors/profiler.js | 2 +- devtools/server/actors/promises.js | 2 +- devtools/server/actors/script.js | 8 +- devtools/server/actors/storage.js | 4 +- devtools/server/actors/styleeditor.js | 4 +- devtools/server/actors/styles.js | 4 +- devtools/server/actors/stylesheets.js | 6 +- devtools/server/actors/timeline.js | 2 +- devtools/server/actors/utils/ScriptStore.js | 2 +- devtools/server/actors/utils/TabSources.js | 4 +- devtools/server/actors/utils/make-debugger.js | 4 +- .../actors/utils/map-uri-to-addon-id.js | 2 +- devtools/server/actors/utils/moz.build | 16 ++ devtools/server/actors/webapps.js | 2 +- devtools/server/actors/webbrowser.js | 2 +- devtools/server/actors/webconsole.js | 12 +- devtools/server/actors/webgl.js | 2 +- devtools/server/child.js | 4 +- devtools/server/content-server.jsm | 2 +- devtools/server/dbg-server.jsm | 2 +- devtools/server/main.js | 14 +- devtools/server/moz.build | 92 +------- devtools/server/protocol.js | 2 +- .../browser/browser_markers-timestamp.js | 2 +- .../browser/browser_perf-legacy-front-01.js | 4 +- .../browser/browser_perf-legacy-front-02.js | 4 +- .../browser/browser_perf-legacy-front-03.js | 4 +- .../tests/browser/browser_perf-profiler-01.js | 2 +- .../tests/browser/browser_perf-profiler-02.js | 2 +- .../tests/browser/browser_perf-profiler-03.js | 2 +- devtools/server/tests/browser/head.js | 8 +- .../tests/mochitest/director-helpers.js | 6 +- .../tests/mochitest/inspector-helpers.js | 4 +- .../server/tests/mochitest/memory-helpers.js | 4 +- .../server/tests/mochitest/memprof-helpers.js | 6 +- .../tests/mochitest/test_connectToChild.html | 6 +- .../mochitest/test_connection-manager.html | 4 +- .../mochitest/test_css-logic-inheritance.html | 4 +- .../test_css-logic-media-queries.html | 4 +- .../mochitest/test_css-logic-specificity.html | 4 +- .../tests/mochitest/test_css-logic.html | 2 +- .../server/tests/mochitest/test_device.html | 4 +- .../tests/mochitest/test_framerate_01.html | 4 +- .../tests/mochitest/test_framerate_02.html | 4 +- .../tests/mochitest/test_framerate_03.html | 4 +- .../tests/mochitest/test_framerate_04.html | 2 +- .../tests/mochitest/test_framerate_05.html | 4 +- .../tests/mochitest/test_framerate_06.html | 2 +- .../tests/mochitest/test_getProcess.html | 4 +- ..._inspector_getImageData-wait-for-load.html | 2 +- .../test_inspector_getImageDataFromURL.html | 2 +- .../tests/mochitest/test_preference.html | 4 +- .../tests/mochitest/test_registerActor.html | 4 +- .../server/tests/mochitest/test_settings.html | 4 +- .../mochitest/test_setupInParentChild.html | 4 +- .../tests/mochitest/test_styles-matched.html | 2 +- devtools/server/tests/unit/head_dbg.js | 14 +- .../server/tests/unit/test_monitor_actor.js | 2 +- .../server/tests/unit/test_registerClient.js | 2 +- devtools/server/worker.js | 2 +- devtools/shared/DevToolsUtils.js | 2 +- devtools/shared/Loader.jsm | 133 ++++++------ .../shared/acorn/tests/unit/head_acorn.js | 140 ++++++------ devtools/shared/apps/Devices.jsm | 2 +- devtools/shared/apps/Simulator.jsm | 2 +- devtools/shared/apps/app-actor-front.js | 6 +- devtools/shared/apps/moz.build | 4 +- .../apps/tests/debugger-protocol-helper.js | 4 +- devtools/shared/apps/tests/unit/head_apps.js | 6 +- devtools/shared/client/connection-manager.js | 8 +- devtools/shared/client/dbg-client.jsm | 6 +- devtools/shared/client/main.js | 10 +- devtools/shared/client/moz.build | 9 +- devtools/shared/css-color.js | 4 +- devtools/shared/discovery/discovery.js | 2 +- devtools/shared/discovery/moz.build | 4 +- .../discovery/tests/unit/test_discovery.js | 6 +- devtools/shared/event-emitter.js | 2 +- devtools/shared/gcli/Templater.jsm | 2 +- devtools/shared/gcli/commands/appcache.js | 2 +- devtools/shared/gcli/commands/calllog.js | 4 +- devtools/shared/gcli/commands/csscoverage.js | 4 +- devtools/shared/gcli/commands/index.js | 44 ++-- devtools/shared/gcli/commands/inject.js | 2 +- devtools/shared/gcli/commands/jsb.js | 2 +- devtools/shared/gcli/commands/listen.js | 2 +- devtools/shared/gcli/commands/moz.build | 28 +++ .../shared/gcli/commands/paintflashing.js | 4 +- devtools/shared/gcli/commands/rulers.js | 2 +- devtools/shared/gcli/commands/screenshot.js | 2 +- devtools/shared/gcli/commands/tools.js | 2 +- devtools/shared/gcli/gcli.jsm | 2 +- devtools/shared/gcli/moz.build | 25 +-- .../gcli/source/lib/gcli/util/domtemplate.js | 2 +- .../shared/heapsnapshot/HeapAnalysesClient.js | 7 +- .../shared/heapsnapshot/HeapAnalysesWorker.js | 2 +- devtools/shared/heapsnapshot/moz.build | 4 +- .../tests/unit/head_heapsnapshot.js | 8 +- devtools/shared/jsbeautify/UPGRADING.md | 2 +- devtools/shared/jsbeautify/beautify.js | 6 +- devtools/shared/jsbeautify/lib/moz.build | 10 + .../jsbeautify/lib/urlencode_unpacker.js | 2 +- devtools/shared/jsbeautify/moz.build | 15 +- .../shared/jsbeautify/src/beautify-html.js | 2 +- devtools/shared/jsbeautify/src/moz.build | 12 ++ .../jsbeautify/tests/unit/head_jsbeautify.js | 10 +- devtools/shared/layout/moz.build | 9 + devtools/shared/moz.build | 18 +- devtools/shared/output-parser.js | 6 +- devtools/shared/performance/io.js | 2 +- devtools/shared/performance/legacy/actors.js | 8 +- .../performance/legacy/compatibility.js | 2 +- devtools/shared/performance/legacy/front.js | 14 +- devtools/shared/performance/legacy/moz.build | 12 ++ .../shared/performance/legacy/recording.js | 6 +- devtools/shared/performance/moz.build | 15 +- devtools/shared/performance/recorder.js | 12 +- devtools/shared/performance/test/head.js | 2 +- .../test_perf-utils-allocations-to-samples.js | 2 +- devtools/shared/pretty-fast/moz.build | 4 +- .../tests/unit/head_pretty-fast.js | 6 +- devtools/shared/qrcode/decoder/moz.build | 4 +- devtools/shared/qrcode/encoder/moz.build | 4 +- devtools/shared/qrcode/moz.build | 4 +- .../qrcode/tests/mochitest/test_decode.html | 4 +- .../shared/qrcode/tests/unit/test_encode.js | 4 +- devtools/shared/security/auth.js | 8 +- devtools/shared/security/cert.js | 2 +- devtools/shared/security/moz.build | 4 +- devtools/shared/security/prompt.js | 6 +- devtools/shared/security/socket.js | 12 +- .../shared/security/tests/unit/head_dbg.js | 6 +- .../security/tests/unit/test_oob_cert_auth.js | 2 +- devtools/shared/shared/memory.js | 4 +- devtools/shared/shared/moz.build | 4 +- devtools/shared/shared/profiler.js | 2 +- .../tests/browser/browser_async_storage.js | 2 +- .../shared/tests/browser/browser_worker-01.js | 7 +- .../shared/tests/browser/browser_worker-02.js | 5 +- .../shared/tests/browser/browser_worker-03.js | 2 +- .../shared/tests/unit/test_indentation.js | 4 +- devtools/shared/shared/timeline.js | 4 +- devtools/shared/shared/worker.js | 8 +- devtools/shared/styleinspector/css-logic.js | 4 +- devtools/shared/styleinspector/moz.build | 4 +- devtools/shared/tern/tests/unit/head_tern.js | 2 +- .../mochitest/test_devtools_extensions.html | 2 +- .../mochitest/test_eventemitter_basic.html | 4 +- .../tests/mochitest/test_loader_paths.html | 6 +- devtools/shared/tests/unit/head_devtools.js | 4 +- .../shared/tests/unit/test_async-utils.js | 2 +- devtools/shared/tests/unit/test_consoleID.js | 4 +- devtools/shared/tests/unit/test_cssColor.js | 2 +- .../shared/tests/unit/test_fetch-resource.js | 2 +- .../tests/unit/test_independent_loaders.js | 4 +- .../tests/unit/test_invisible_loader.js | 4 +- .../shared/tests/unit/test_prettifyCSS.js | 2 +- devtools/shared/tests/unit/test_require.js | 4 +- .../shared/tests/unit/test_require_lazy.js | 2 +- devtools/shared/touch/moz.build | 4 +- devtools/shared/touch/simulator.js | 2 +- devtools/shared/transport/moz.build | 4 +- devtools/shared/transport/packets.js | 4 +- devtools/shared/transport/stream-utils.js | 4 +- .../shared/transport/tests/unit/head_dbg.js | 6 +- .../unit/test_dbgsocket_connection_drop.js | 2 +- .../tests/unit/test_delimited_read.js | 2 +- .../transport/tests/unit/test_packet.js | 2 +- devtools/shared/transport/transport.js | 10 +- devtools/shared/webconsole/client.js | 6 +- devtools/shared/webconsole/moz.build | 4 +- devtools/shared/webconsole/network-helper.js | 2 +- devtools/shared/webconsole/network-monitor.js | 4 +- .../webconsole/server-logger-monitor.js | 4 +- devtools/shared/webconsole/server-logger.js | 6 +- devtools/shared/webconsole/test/common.js | 10 +- .../test/test_commands_registration.html | 4 +- .../test/test_consoleapi_innerID.html | 2 +- .../shared/webconsole/test/test_jsterm.html | 4 +- .../test/unit/test_js_property_provider.js | 4 +- .../test/unit/test_network_helper.js | 4 +- .../unit/test_security-info-certificate.js | 4 +- .../test/unit/test_security-info-parser.js | 4 +- .../test_security-info-protocol-version.js | 4 +- .../test/unit/test_security-info-state.js | 4 +- .../unit/test_security-info-static-hpkp.js | 4 +- .../test_security-info-weakness-reasons.js | 4 +- devtools/shared/webconsole/utils.js | 6 +- devtools/shared/worker-loader.js | 14 +- devtools/templates.mozbuild | 31 +++ dom/manifest/ManifestProcessor.jsm | 2 +- .../chrome/test_onGarbageCollection.html | 2 +- mobile/android/chrome/content/EmbedRT.js | 2 +- .../android/chrome/content/RemoteDebugger.js | 2 +- .../browser/chrome/test_debugger_server.html | 2 +- testing/marionette/driver.js | 4 +- testing/marionette/server.js | 2 +- testing/mochitest/browser-test.js | 2 +- .../devtools/addon/content/damp.js | 4 +- testing/xpcshell/dbg-actors.js | 2 +- testing/xpcshell/head.js | 2 +- .../components/addoncompat/CompatWarning.jsm | 2 +- toolkit/components/extensions/Extension.jsm | 2 +- .../passwordmgr/InsecurePasswordUtils.jsm | 4 +- .../components/passwordmgr/LoginHelper.jsm | 2 +- .../perfmonitoring/AddonWatcher.jsm | 2 +- .../components/places/PlacesTransactions.jsm | 2 +- .../ContentProcessSingleton.js | 2 +- toolkit/content/browser-content.js | 2 +- toolkit/modules/Sqlite.jsm | 2 +- .../mozapps/extensions/content/extensions.js | 2 +- .../extensions/internal/XPIProvider.jsm | 4 +- webapprt/RemoteDebugger.jsm | 2 +- webapprt/content/dbg-webapp-actors.js | 2 +- webapprt/test/chrome/browser_debugger.js | 4 +- 786 files changed, 2673 insertions(+), 2406 deletions(-) create mode 100644 devtools/client/debugger/content/actions/moz.build create mode 100644 devtools/client/debugger/content/moz.build create mode 100644 devtools/client/debugger/content/reducers/moz.build create mode 100644 devtools/client/debugger/content/views/moz.build create mode 100644 devtools/client/memory/modules/moz.build create mode 100644 devtools/client/performance/modules/logic/moz.build create mode 100644 devtools/client/performance/modules/moz.build create mode 100644 devtools/client/performance/modules/widgets/moz.build create mode 100644 devtools/client/projecteditor/lib/helpers/moz.build create mode 100644 devtools/client/projecteditor/lib/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/app-manager/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/delete/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/dirty/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/image-view/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/logging/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/new/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/rename/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/save/moz.build create mode 100644 devtools/client/projecteditor/lib/plugins/status-bar/moz.build create mode 100644 devtools/client/projecteditor/lib/stores/moz.build create mode 100644 devtools/client/shared/redux/middleware/moz.build create mode 100644 devtools/client/shared/widgets/moz.build create mode 100644 devtools/client/webide/modules/moz.build create mode 100644 devtools/server/actors/highlighters/moz.build create mode 100644 devtools/server/actors/highlighters/utils/moz.build create mode 100644 devtools/server/actors/moz.build create mode 100644 devtools/server/actors/utils/moz.build create mode 100644 devtools/shared/gcli/commands/moz.build create mode 100644 devtools/shared/jsbeautify/lib/moz.build create mode 100644 devtools/shared/jsbeautify/src/moz.build create mode 100644 devtools/shared/layout/moz.build create mode 100644 devtools/shared/performance/legacy/moz.build create mode 100644 devtools/templates.mozbuild diff --git a/addon-sdk/source/lib/dev/debuggee.js b/addon-sdk/source/lib/dev/debuggee.js index 90657f3cb5ea..4ff89b851434 100644 --- a/addon-sdk/source/lib/dev/debuggee.js +++ b/addon-sdk/source/lib/dev/debuggee.js @@ -11,7 +11,7 @@ module.metadata = { const { Cu } = require("chrome"); const { Class } = require("../sdk/core/heritage"); const { MessagePort, MessageChannel } = require("../sdk/messaging"); -const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { DebuggerServer } = devtoolsRequire("devtools/server/main"); const outputs = new WeakMap(); diff --git a/addon-sdk/source/lib/dev/toolbox.js b/addon-sdk/source/lib/dev/toolbox.js index 1bf1eff00dfe..bfade3b1d0d1 100644 --- a/addon-sdk/source/lib/dev/toolbox.js +++ b/addon-sdk/source/lib/dev/toolbox.js @@ -15,7 +15,7 @@ const { contract, validate } = require("../sdk/util/contract"); const { each, pairs, values } = require("../sdk/util/sequence"); const { onEnable, onDisable } = require("../dev/theme/hooks"); -const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); +const { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {}); // This is temporary workaround to allow loading of the developer tools client - volcan // into a toolbox panel, this hack won't be necessary as soon as devtools patch will be diff --git a/addon-sdk/source/lib/dev/utils.js b/addon-sdk/source/lib/dev/utils.js index 35522b3383a5..65aa301f1ccd 100644 --- a/addon-sdk/source/lib/dev/utils.js +++ b/addon-sdk/source/lib/dev/utils.js @@ -5,8 +5,8 @@ "use strict"; const { Cu } = require("chrome"); -const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); -const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {}); +const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { getActiveTab } = require("../sdk/tabs/utils"); const { getMostRecentBrowserWindow } = require("../sdk/window/utils"); diff --git a/addon-sdk/source/lib/sdk/addon/runner.js b/addon-sdk/source/lib/sdk/addon/runner.js index 78c95bfe8cf1..96f5ad29e4e3 100644 --- a/addon-sdk/source/lib/sdk/addon/runner.js +++ b/addon-sdk/source/lib/sdk/addon/runner.js @@ -24,7 +24,7 @@ const Startup = Cu.import("resource://gre/modules/sdk/system/Startup.js", {}).ex Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function () { - return Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", {}). + return Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm", {}). BrowserToolboxProcess; }); diff --git a/addon-sdk/source/lib/sdk/console/plain-text.js b/addon-sdk/source/lib/sdk/console/plain-text.js index 50c4d1513ecf..c0cfc94e1ef0 100644 --- a/addon-sdk/source/lib/sdk/console/plain-text.js +++ b/addon-sdk/source/lib/sdk/console/plain-text.js @@ -12,7 +12,7 @@ const { Cc, Ci, Cu, Cr } = require("chrome"); const self = require("../self"); const prefs = require("../preferences/service"); const { merge } = require("../util/object"); -const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); +const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}); const DEFAULT_LOG_LEVEL = "error"; const ADDON_LOG_LEVEL_PREF = "extensions." + self.id + ".sdk.console.logLevel"; diff --git a/addon-sdk/source/lib/sdk/loader/sandbox.js b/addon-sdk/source/lib/sdk/loader/sandbox.js index e58f34461bc9..765f5ba5319a 100644 --- a/addon-sdk/source/lib/sdk/loader/sandbox.js +++ b/addon-sdk/source/lib/sdk/loader/sandbox.js @@ -15,7 +15,7 @@ const self = require('sdk/self'); const { getTabId, getTabForContentWindow } = require('../tabs/utils'); const { getInnerId } = require('../window/utils'); -const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { require: devtoolsRequire } = devtools; const { addContentGlobal, removeContentGlobal } = devtoolsRequire("devtools/server/content-globals"); diff --git a/addon-sdk/source/lib/toolkit/loader.js b/addon-sdk/source/lib/toolkit/loader.js index b7079224460d..4ec45483cb5c 100644 --- a/addon-sdk/source/lib/toolkit/loader.js +++ b/addon-sdk/source/lib/toolkit/loader.js @@ -798,7 +798,7 @@ function Loader(options) { globals: { get console() { // Import Console.jsm from here to prevent loading it until someone uses it - let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm"); + let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm"); let console = new ConsoleAPI({ consoleID: options.id ? "addon/" + options.id : "" }); diff --git a/addon-sdk/source/test/addons/page-mod-debugger-post/main.js b/addon-sdk/source/test/addons/page-mod-debugger-post/main.js index ff37582598e8..8dbe8004c226 100644 --- a/addon-sdk/source/test/addons/page-mod-debugger-post/main.js +++ b/addon-sdk/source/test/addons/page-mod-debugger-post/main.js @@ -12,9 +12,9 @@ const { getMostRecentBrowserWindow } = require('sdk/window/utils'); const { data } = require('sdk/self'); const { set } = require('sdk/preferences/service'); -const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { DebuggerServer } = devtoolsRequire("devtools/server/main"); -const { DebuggerClient } = devtoolsRequire("devtools/toolkit/client/main"); +const { DebuggerClient } = devtoolsRequire("devtools/shared/client/main"); var gClient; var ok; diff --git a/addon-sdk/source/test/addons/page-mod-debugger-pre/main.js b/addon-sdk/source/test/addons/page-mod-debugger-pre/main.js index 71265287905d..04b8b1c8466f 100644 --- a/addon-sdk/source/test/addons/page-mod-debugger-pre/main.js +++ b/addon-sdk/source/test/addons/page-mod-debugger-pre/main.js @@ -12,9 +12,9 @@ const { getMostRecentBrowserWindow } = require('sdk/window/utils'); const { data } = require('sdk/self'); const { set } = require('sdk/preferences/service'); -const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { DebuggerServer } = devtoolsRequire("devtools/server/main"); -const { DebuggerClient } = devtoolsRequire("devtools/toolkit/client/main"); +const { DebuggerClient } = devtoolsRequire("devtools/shared/client/main"); var gClient; var ok; diff --git a/addon-sdk/source/test/test-page-mod-debug.js b/addon-sdk/source/test/test-page-mod-debug.js index 9e78947b6dd1..05470e6fe375 100644 --- a/addon-sdk/source/test/test-page-mod-debug.js +++ b/addon-sdk/source/test/test-page-mod-debug.js @@ -10,7 +10,7 @@ const { testPageMod, handleReadyState, openNewTab, const { cleanUI, after } = require("sdk/test/utils"); const { open, getFrames, getMostRecentBrowserWindow, getInnerId } = require("sdk/window/utils"); -const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { require: devtoolsRequire } = devtools; const contentGlobals = devtoolsRequire("devtools/server/content-globals"); diff --git a/addon-sdk/test/head.js b/addon-sdk/test/head.js index a0e426b3fb9f..88e548fcf07b 100644 --- a/addon-sdk/test/head.js +++ b/addon-sdk/test/head.js @@ -5,7 +5,7 @@ const { utils: Cu } = Components; const { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); const LoaderModule = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}).Loader; -const { console } = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); +const { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}); var { Loader, main, Module, Require, unload } = LoaderModule; diff --git a/b2g/chrome/content/desktop.js b/b2g/chrome/content/desktop.js index 420da50cfa7e..9ffd22041f95 100644 --- a/b2g/chrome/content/desktop.js +++ b/b2g/chrome/content/desktop.js @@ -8,9 +8,9 @@ var isMulet = "ResponsiveUI" in browserWindow; // Enable touch event shim on desktop that translates mouse events // into touch ones function enableTouch() { - let require = Cu.import('resource://gre/modules/devtools/Loader.jsm', {}) + let require = Cu.import('resource://gre/modules/devtools/shared/Loader.jsm', {}) .devtools.require; - let { TouchEventSimulator } = require('devtools/toolkit/touch/simulator'); + let { TouchEventSimulator } = require('devtools/shared/touch/simulator'); let touchEventSimulator = new TouchEventSimulator(shell.contentBrowser); touchEventSimulator.start(); } @@ -108,7 +108,7 @@ function checkDebuggerPort() { function initResponsiveDesign() { - Cu.import('resource:///modules/devtools/responsivedesign.jsm'); + Cu.import('resource:///modules/devtools/client/responsivedesign/responsivedesign.jsm'); ResponsiveUIManager.on('on', function(event, {tab:tab}) { let responsive = ResponsiveUIManager.getResponsiveUIForTab(tab); let document = tab.ownerDocument; @@ -154,8 +154,8 @@ function openDevtools() { Services.prefs.setIntPref('devtools.toolbox.sidebar.width', browserWindow.outerWidth - 550); Services.prefs.setCharPref('devtools.toolbox.host', 'side'); - let {gDevTools} = Cu.import('resource:///modules/devtools/gDevTools.jsm', {}); - let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + let {gDevTools} = Cu.import('resource:///modules/devtools/client/framework/gDevTools.jsm', {}); + let {devtools} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); let target = devtools.TargetFactory.forTab(browserWindow.gBrowser.selectedTab); gDevTools.showToolbox(target); } diff --git a/b2g/chrome/content/devtools/debugger.js b/b2g/chrome/content/devtools/debugger.js index f0a202f75a76..81259e4be5ba 100644 --- a/b2g/chrome/content/devtools/debugger.js +++ b/b2g/chrome/content/devtools/debugger.js @@ -8,7 +8,7 @@ XPCOMUtils.defineLazyGetter(this, "devtools", function() { const { devtools } = - Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); return devtools; }); @@ -26,7 +26,7 @@ XPCOMUtils.defineLazyGetter(this, "B2GTabList", function() { // Load the discovery module eagerly, so that it can set a device name at // startup. This does not cause discovery to start listening for packets, as // that only happens once DevTools is enabled. -devtools.require("devtools/toolkit/discovery/discovery"); +devtools.require("devtools/shared/discovery/discovery"); var RemoteDebugger = { _listening: false, @@ -103,7 +103,7 @@ var RemoteDebugger = { } this._listen(); - const QR = devtools.require("devtools/toolkit/qrcode/index"); + const QR = devtools.require("devtools/shared/qrcode/index"); this._receivingOOB = new Promise((resolve, reject) => { this._handleAuthEvent = detail => { debug(detail.action); diff --git a/b2g/chrome/content/devtools/hud.js b/b2g/chrome/content/devtools/hud.js index 2d3c20e90862..3836e7e75547 100644 --- a/b2g/chrome/content/devtools/hud.js +++ b/b2g/chrome/content/devtools/hud.js @@ -10,16 +10,16 @@ const DEVELOPER_HUD_LOG_PREFIX = 'DeveloperHUD'; const CUSTOM_HISTOGRAM_PREFIX = 'DEVTOOLS_HUD_CUSTOM_'; XPCOMUtils.defineLazyGetter(this, 'devtools', function() { - const {devtools} = Cu.import('resource://gre/modules/devtools/Loader.jsm', {}); + const {devtools} = Cu.import('resource://gre/modules/devtools/shared/Loader.jsm', {}); return devtools; }); XPCOMUtils.defineLazyGetter(this, 'DebuggerClient', function() { - return devtools.require('devtools/toolkit/client/main').DebuggerClient; + return devtools.require('devtools/shared/client/main').DebuggerClient; }); XPCOMUtils.defineLazyGetter(this, 'WebConsoleUtils', function() { - return devtools.require('devtools/toolkit/webconsole/utils').Utils; + return devtools.require('devtools/shared/webconsole/utils').Utils; }); XPCOMUtils.defineLazyGetter(this, 'EventLoopLagFront', function() { diff --git a/b2g/components/DebuggerActors.js b/b2g/components/DebuggerActors.js index af6446d028fe..318c46e68844 100644 --- a/b2g/components/DebuggerActors.js +++ b/b2g/components/DebuggerActors.js @@ -7,7 +7,7 @@ "use strict"; const { Cu } = require("chrome"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils.js"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const promise = require("promise"); const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm"); const { BrowserTabList } = require("devtools/server/actors/webbrowser"); diff --git a/b2g/simulator/bootstrap.js b/b2g/simulator/bootstrap.js index dcc508951db0..0020815151ba 100644 --- a/b2g/simulator/bootstrap.js +++ b/b2g/simulator/bootstrap.js @@ -31,7 +31,7 @@ function startup(data, reason) { Cu.import('resource://gre/modules/commonjs/toolkit/loader.js').Loader; let { Loader, Require, Main } = loaderModule; - const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm"); + const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm"); let loader = Loader({ paths: { diff --git a/b2g/simulator/lib/main.js b/b2g/simulator/lib/main.js index 528edf67b616..28fc358adc86 100644 --- a/b2g/simulator/lib/main.js +++ b/b2g/simulator/lib/main.js @@ -8,7 +8,7 @@ const { Cc, Ci, Cu } = require("chrome"); const { AddonManager } = Cu.import("resource://gre/modules/AddonManager.jsm", {}); const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {}); const { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); -const { Simulator } = Cu.import("resource://gre/modules/devtools/Simulator.jsm"); +const { Simulator } = Cu.import("resource://gre/modules/devtools/shared/apps/Simulator.jsm"); const { SimulatorProcess } = require("./simulator-process"); const Runtime = require("sdk/system/runtime"); const URL = require("sdk/url"); diff --git a/b2g/simulator/lib/simulator-process.js b/b2g/simulator/lib/simulator-process.js index bf20cd0b526d..4838817d9a88 100644 --- a/b2g/simulator/lib/simulator-process.js +++ b/b2g/simulator/lib/simulator-process.js @@ -13,7 +13,7 @@ const Environment = require("sdk/system/environment").env; const Runtime = require("sdk/system/runtime"); const Subprocess = require("sdk/system/child_process/subprocess"); const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {}); -const { EventEmitter } = Cu.import("resource://gre/modules/devtools/event-emitter.js", {}); +const { EventEmitter } = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {}); // Log subprocess error and debug messages to the console. This logs messages diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 545b18aff315..e9dbf66b74b8 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -181,13 +181,13 @@ XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () { XPCOMUtils.defineLazyGetter(this, "DeveloperToolbar", function() { let tmp = {}; - Cu.import("resource:///modules/devtools/DeveloperToolbar.jsm", tmp); + Cu.import("resource:///modules/devtools/client/shared/DeveloperToolbar.jsm", tmp); return new tmp.DeveloperToolbar(window, document.getElementById("developer-toolbar")); }); XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function() { let tmp = {}; - Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", tmp); + Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm", tmp); return tmp.BrowserToolboxProcess; }); @@ -7689,15 +7689,15 @@ var TabContextMenu = { }; XPCOMUtils.defineLazyModuleGetter(this, "gDevTools", - "resource:///modules/devtools/gDevTools.jsm"); + "resource:///modules/devtools/client/framework/gDevTools.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "gDevToolsBrowser", - "resource:///modules/devtools/gDevTools.jsm"); + "resource:///modules/devtools/client/framework/gDevTools.jsm"); Object.defineProperty(this, "HUDService", { get: function HUDService_getter() { - let devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools; - return devtools.require("devtools/webconsole/hudservice"); + let devtools = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}).devtools; + return devtools.require("devtools/client/webconsole/hudservice"); }, configurable: true, enumerable: true @@ -7768,7 +7768,7 @@ var Scratchpad = { XPCOMUtils.defineLazyGetter(Scratchpad, "ScratchpadManager", function() { let tmp = {}; - Cu.import("resource:///modules/devtools/scratchpad-manager.jsm", tmp); + Cu.import("resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm", tmp); return tmp.ScratchpadManager; }); @@ -7780,7 +7780,7 @@ var ResponsiveUI = { XPCOMUtils.defineLazyGetter(ResponsiveUI, "ResponsiveUIManager", function() { let tmp = {}; - Cu.import("resource:///modules/devtools/responsivedesign.jsm", tmp); + Cu.import("resource:///modules/devtools/client/responsivedesign/responsivedesign.jsm", tmp); return tmp.ResponsiveUIManager; }); @@ -7792,8 +7792,8 @@ function openEyedropper() { Object.defineProperty(this, "Eyedropper", { get: function() { - let devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools; - return devtools.require("devtools/eyedropper/eyedropper").Eyedropper; + let devtools = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}).devtools; + return devtools.require("devtools/client/eyedropper/eyedropper").Eyedropper; }, configurable: true, enumerable: true diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index 2a4b3fb62215..7cb33a1f04aa 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -555,7 +555,7 @@ nsContextMenu.prototype = { }, inspectNode: function CM_inspectNode() { - let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + let {devtools} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); let gBrowser = this.browser.ownerDocument.defaultView.gBrowser; let tt = devtools.TargetFactory.forTab(gBrowser.selectedTab); return gDevTools.showToolbox(tt, "inspector").then(function(toolbox) { diff --git a/browser/components/customizableui/logging.js b/browser/components/customizableui/logging.js index cb20b8b9a12b..8e0493715790 100644 --- a/browser/components/customizableui/logging.js +++ b/browser/components/customizableui/logging.js @@ -5,7 +5,7 @@ #endif XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); var gDebug = false; try { diff --git a/browser/components/downloads/DownloadsCommon.jsm b/browser/components/downloads/DownloadsCommon.jsm index de3ebab0f5f8..3f8cbe8c9832 100644 --- a/browser/components/downloads/DownloadsCommon.jsm +++ b/browser/components/downloads/DownloadsCommon.jsm @@ -64,7 +64,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyGetter(this, "DownloadsLogger", () => { - let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); + let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}); let consoleOptions = { maxLogLevelPref: "browser.download.loglevel", prefix: "Downloads" diff --git a/browser/components/extensions/ext-browserAction.js b/browser/components/extensions/ext-browserAction.js index 7d56c44aa153..8cab7f323065 100644 --- a/browser/components/extensions/ext-browserAction.js +++ b/browser/components/extensions/ext-browserAction.js @@ -1,7 +1,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI", "resource:///modules/CustomizableUI.jsm"); -Cu.import("resource://gre/modules/devtools/event-emitter.js"); +Cu.import("resource://gre/modules/devtools/shared/event-emitter.js"); Cu.import("resource://gre/modules/ExtensionUtils.jsm"); var { diff --git a/browser/components/loop/modules/LoopContacts.jsm b/browser/components/loop/modules/LoopContacts.jsm index f3bc8c49f685..c5a440f6fef9 100644 --- a/browser/components/loop/modules/LoopContacts.jsm +++ b/browser/components/loop/modules/LoopContacts.jsm @@ -7,7 +7,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "LoopStorage", "resource:///modules/loop/LoopStorage.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Promise", @@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "CardDavImporter", XPCOMUtils.defineLazyModuleGetter(this, "GoogleImporter", "resource:///modules/loop/GoogleImporter.jsm"); XPCOMUtils.defineLazyGetter(this, "eventEmitter", function() { - const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {}); + const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {}); return new EventEmitter(); }); diff --git a/browser/components/loop/modules/LoopRooms.jsm b/browser/components/loop/modules/LoopRooms.jsm index ba85c62a6c26..c7beaa7d82e8 100644 --- a/browser/components/loop/modules/LoopRooms.jsm +++ b/browser/components/loop/modules/LoopRooms.jsm @@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WebChannel", "resource://gre/modules/WebChannel.jsm"); XPCOMUtils.defineLazyGetter(this, "eventEmitter", function() { - const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {}); + const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {}); return new EventEmitter(); }); XPCOMUtils.defineLazyGetter(this, "gLoopBundle", function() { diff --git a/browser/components/loop/modules/LoopStorage.jsm b/browser/components/loop/modules/LoopStorage.jsm index 58971025a429..aef5a9213fdd 100644 --- a/browser/components/loop/modules/LoopStorage.jsm +++ b/browser/components/loop/modules/LoopStorage.jsm @@ -19,7 +19,7 @@ try { Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyGetter(this, "eventEmitter", function() { - const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {}); + const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {}); return new EventEmitter(); }); diff --git a/browser/components/loop/modules/MozLoopService.jsm b/browser/components/loop/modules/MozLoopService.jsm index 66e5586a78d7..bed352c236a8 100644 --- a/browser/components/loop/modules/MozLoopService.jsm +++ b/browser/components/loop/modules/MozLoopService.jsm @@ -164,7 +164,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gWM", // Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref. XPCOMUtils.defineLazyGetter(this, "log", () => { - let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI; + let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI; let consoleOptions = { maxLogLevelPref: PREF_LOG_LEVEL, prefix: "Loop" diff --git a/browser/components/sessionstore/SessionFile.jsm b/browser/components/sessionstore/SessionFile.jsm index cbf8e53b00b8..4784b154862d 100644 --- a/browser/components/sessionstore/SessionFile.jsm +++ b/browser/components/sessionstore/SessionFile.jsm @@ -38,7 +38,7 @@ Cu.import("resource://gre/modules/AsyncShutdown.jsm"); Cu.import("resource://gre/modules/Preferences.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "RunState", "resource:///modules/sessionstore/RunState.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch", diff --git a/browser/components/sessionstore/SessionSaver.jsm b/browser/components/sessionstore/SessionSaver.jsm index 84b6c0bd02cf..10a5edd30ebc 100644 --- a/browser/components/sessionstore/SessionSaver.jsm +++ b/browser/components/sessionstore/SessionSaver.jsm @@ -18,7 +18,7 @@ Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this); XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter", "resource:///modules/sessionstore/PrivacyFilter.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "SessionStore", diff --git a/browser/components/sessionstore/SessionStorage.jsm b/browser/components/sessionstore/SessionStorage.jsm index 9d51bb4f4f59..5ed1dbdfa865 100644 --- a/browser/components/sessionstore/SessionStorage.jsm +++ b/browser/components/sessionstore/SessionStorage.jsm @@ -14,7 +14,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); // Returns the principal for a given |frame| contained in a given |docShell|. function getPrincipalForFrame(docShell, frame) { diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index 48908dc307d2..a7f5fc40d58f 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -128,7 +128,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager", XPCOMUtils.defineLazyServiceGetter(this, "Telemetry", "@mozilla.org/base/telemetry;1", "nsITelemetry"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", "resource:///modules/RecentWindow.jsm"); @@ -141,7 +141,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter", XPCOMUtils.defineLazyModuleGetter(this, "RunState", "resource:///modules/sessionstore/RunState.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ScratchpadManager", - "resource:///modules/devtools/scratchpad-manager.jsm"); + "resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "SessionSaver", "resource:///modules/sessionstore/SessionSaver.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "SessionCookies", diff --git a/browser/components/sessionstore/TabState.jsm b/browser/components/sessionstore/TabState.jsm index 52d88068f89d..004a61ff99a2 100644 --- a/browser/components/sessionstore/TabState.jsm +++ b/browser/components/sessionstore/TabState.jsm @@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/Promise.jsm", this); Cu.import("resource://gre/modules/Task.jsm", this); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter", "resource:///modules/sessionstore/PrivacyFilter.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "TabStateCache", diff --git a/browser/components/sessionstore/nsSessionStartup.js b/browser/components/sessionstore/nsSessionStartup.js index bf2f6da97d4e..a01b4985760e 100644 --- a/browser/components/sessionstore/nsSessionStartup.js +++ b/browser/components/sessionstore/nsSessionStartup.js @@ -42,7 +42,7 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "SessionFile", "resource:///modules/sessionstore/SessionFile.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "CrashMonitor", diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index 7b124b4ee3ee..889325dca39f 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -73,7 +73,7 @@ const TARGET_SEARCHENGINE_PREFIX = "searchEngine-"; // Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref. XPCOMUtils.defineLazyGetter(this, "log", () => { - let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI; + let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI; let consoleOptions = { maxLogLevelPref: PREF_LOG_LEVEL, prefix: "UITour", diff --git a/devtools/client/animationinspector/animation-controller.js b/devtools/client/animationinspector/animation-controller.js index 8650f59f7f13..d7f14d21ad8e 100644 --- a/devtools/client/animationinspector/animation-controller.js +++ b/devtools/client/animationinspector/animation-controller.js @@ -11,13 +11,13 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; Cu.import("resource://gre/modules/Task.jsm"); -var { loader, require } = Cu.import("resource://gre/modules/devtools/Loader.jsm"); -Cu.import("resource://gre/modules/devtools/Console.jsm"); -Cu.import("resource:///modules/devtools/ViewHelpers.jsm"); +var { loader, require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm"); +Cu.import("resource://gre/modules/devtools/shared/Console.jsm"); +Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm"); loader.lazyRequireGetter(this, "promise"); loader.lazyRequireGetter(this, "EventEmitter", - "devtools/toolkit/event-emitter"); + "devtools/shared/event-emitter"); loader.lazyRequireGetter(this, "AnimationsFront", "devtools/server/actors/animation", true); diff --git a/devtools/client/animationinspector/animation-panel.js b/devtools/client/animationinspector/animation-panel.js index 774d42672e87..fba63246f3ea 100644 --- a/devtools/client/animationinspector/animation-panel.js +++ b/devtools/client/animationinspector/animation-panel.js @@ -8,7 +8,7 @@ "use strict"; -const {AnimationsTimeline} = require("devtools/animationinspector/components"); +const {AnimationsTimeline} = require("devtools/client/animationinspector/components"); /** * The main animations panel UI. diff --git a/devtools/client/animationinspector/components.js b/devtools/client/animationinspector/components.js index 3349c9ccbfdc..232f08450516 100644 --- a/devtools/client/animationinspector/components.js +++ b/devtools/client/animationinspector/components.js @@ -21,13 +21,13 @@ // c.destroy(); const {Cu} = require("chrome"); -Cu.import("resource:///modules/devtools/ViewHelpers.jsm"); +Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm"); const {Task} = Cu.import("resource://gre/modules/Task.jsm", {}); const { createNode, drawGraphElementBackground, findOptimalTimeInterval -} = require("devtools/animationinspector/utils"); +} = require("devtools/client/animationinspector/utils"); const STRINGS_URI = "chrome://browser/locale/devtools/animationinspector.properties"; const L10N = new ViewHelpers.L10N(STRINGS_URI); diff --git a/devtools/client/animationinspector/moz.build b/devtools/client/animationinspector/moz.build index d22e8eb60ce3..ddad05fb324d 100644 --- a/devtools/client/animationinspector/moz.build +++ b/devtools/client/animationinspector/moz.build @@ -7,7 +7,7 @@ BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] -EXTRA_JS_MODULES.devtools.animationinspector += [ +DevToolsModules( 'components.js', 'utils.js', -] +) diff --git a/devtools/client/animationinspector/test/browser_animation_timeline_header.js b/devtools/client/animationinspector/test/browser_animation_timeline_header.js index c97954599d8e..e88024180004 100644 --- a/devtools/client/animationinspector/test/browser_animation_timeline_header.js +++ b/devtools/client/animationinspector/test/browser_animation_timeline_header.js @@ -6,8 +6,8 @@ // Check that the timeline shows correct time graduations in the header. -const {findOptimalTimeInterval} = require("devtools/animationinspector/utils"); -const {TimeScale} = require("devtools/animationinspector/components"); +const {findOptimalTimeInterval} = require("devtools/client/animationinspector/utils"); +const {TimeScale} = require("devtools/client/animationinspector/components"); // Should be kept in sync with TIME_GRADUATION_MIN_SPACING in components.js const TIME_GRADUATION_MIN_SPACING = 40; diff --git a/devtools/client/animationinspector/test/head.js b/devtools/client/animationinspector/test/head.js index 75300076f2cc..39d087bac338 100644 --- a/devtools/client/animationinspector/test/head.js +++ b/devtools/client/animationinspector/test/head.js @@ -5,13 +5,13 @@ "use strict"; const Cu = Components.utils; -const {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {}); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const promise = require("promise"); -const {TargetFactory} = require("devtools/framework/target"); -const {console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); -const {ViewHelpers} = Cu.import("resource:///modules/devtools/ViewHelpers.jsm", {}); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const {TargetFactory} = require("devtools/client/framework/target"); +const {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}); +const {ViewHelpers} = Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm", {}); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); // All tests are asynchronous waitForExplicitFinish(); diff --git a/devtools/client/animationinspector/test/unit/test_findOptimalTimeInterval.js b/devtools/client/animationinspector/test/unit/test_findOptimalTimeInterval.js index ffb940386169..5543ffa95878 100644 --- a/devtools/client/animationinspector/test/unit/test_findOptimalTimeInterval.js +++ b/devtools/client/animationinspector/test/unit/test_findOptimalTimeInterval.js @@ -7,8 +7,8 @@ "use strict"; const Cu = Components.utils; -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -const {findOptimalTimeInterval} = require("devtools/animationinspector/utils"); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +const {findOptimalTimeInterval} = require("devtools/client/animationinspector/utils"); // This test array contains objects that are used to test the // findOptimalTimeInterval function. Each object should have the following diff --git a/devtools/client/animationinspector/test/unit/test_timeScale.js b/devtools/client/animationinspector/test/unit/test_timeScale.js index 4284733eb6d9..26c137b30727 100644 --- a/devtools/client/animationinspector/test/unit/test_timeScale.js +++ b/devtools/client/animationinspector/test/unit/test_timeScale.js @@ -6,8 +6,8 @@ "use strict"; const Cu = Components.utils; -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -const {TimeScale} = require("devtools/animationinspector/components"); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +const {TimeScale} = require("devtools/client/animationinspector/components"); const TEST_ANIMATIONS = [{ desc: "Testing a few standard animations", diff --git a/devtools/client/app-manager/app-projects.js b/devtools/client/app-manager/app-projects.js index c8f2bf5f2240..3b2b5cc3f026 100644 --- a/devtools/client/app-manager/app-projects.js +++ b/devtools/client/app-manager/app-projects.js @@ -1,8 +1,8 @@ const {Cc,Ci,Cu,Cr} = require("chrome"); -const ObservableObject = require("devtools/shared/observable-object"); -const promise = require("devtools/toolkit/deprecated-sync-thenables"); +const ObservableObject = require("devtools/client/shared/observable-object"); +const promise = require("devtools/shared/deprecated-sync-thenables"); -const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js"); +const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js"); const {generateUUID} = Cc['@mozilla.org/uuid-generator;1'].getService(Ci.nsIUUIDGenerator); const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm"); const { indexedDB } = require("sdk/indexed-db"); diff --git a/devtools/client/app-manager/app-validator.js b/devtools/client/app-manager/app-validator.js index 99ed2b386832..01fc4c0af486 100644 --- a/devtools/client/app-manager/app-validator.js +++ b/devtools/client/app-manager/app-validator.js @@ -4,7 +4,7 @@ "use strict"; var {Ci,Cu,CC} = require("chrome"); -const promise = require("devtools/toolkit/deprecated-sync-thenables"); +const promise = require("devtools/shared/deprecated-sync-thenables"); const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm"); const {Services} = Cu.import("resource://gre/modules/Services.jsm"); diff --git a/devtools/client/app-manager/builtin-adb-store.js b/devtools/client/app-manager/builtin-adb-store.js index 19e43726a67a..ae8e5963e41e 100644 --- a/devtools/client/app-manager/builtin-adb-store.js +++ b/devtools/client/app-manager/builtin-adb-store.js @@ -3,8 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const {Cu} = require("chrome"); -const ObservableObject = require("devtools/shared/observable-object"); -const {Devices} = Cu.import("resource://gre/modules/devtools/Devices.jsm"); +const ObservableObject = require("devtools/client/shared/observable-object"); +const {Devices} = Cu.import("resource://gre/modules/devtools/shared/apps/Devices.jsm"); var store = new ObservableObject({versions:[]}); diff --git a/devtools/client/app-manager/connection-store.js b/devtools/client/app-manager/connection-store.js index e54ceff33620..a09ba6ae9114 100644 --- a/devtools/client/app-manager/connection-store.js +++ b/devtools/client/app-manager/connection-store.js @@ -2,8 +2,8 @@ * 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/. */ -const ObservableObject = require("devtools/shared/observable-object"); -const {Connection} = require("devtools/client/connection-manager"); +const ObservableObject = require("devtools/client/shared/observable-object"); +const {Connection} = require("devtools/shared/client/connection-manager"); const _knownConnectionStores = new WeakMap(); diff --git a/devtools/client/app-manager/content/connection-footer.js b/devtools/client/app-manager/content/connection-footer.js index 9fb55057d9ec..ed67805cfe71 100644 --- a/devtools/client/app-manager/content/connection-footer.js +++ b/devtools/client/app-manager/content/connection-footer.js @@ -5,18 +5,18 @@ const Cu = Components.utils; const Ci = Components.interfaces; Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource:///modules/devtools/gDevTools.jsm"); +Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm"); -const {Simulator} = Cu.import("resource://gre/modules/devtools/Simulator.jsm") -const {Devices} = Cu.import("resource://gre/modules/devtools/Devices.jsm"); -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const {Simulator} = Cu.import("resource://gre/modules/devtools/shared/apps/Simulator.jsm") +const {Devices} = Cu.import("resource://gre/modules/devtools/shared/apps/Devices.jsm"); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); -const {ConnectionManager, Connection} = require("devtools/client/connection-manager"); +const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager"); const {getDeviceFront} = require("devtools/server/actors/device"); -const ConnectionStore = require("devtools/app-manager/connection-store"); -const DeviceStore = require("devtools/app-manager/device-store"); -const simulatorsStore = require("devtools/app-manager/simulators-store"); -const adbStore = require("devtools/app-manager/builtin-adb-store"); +const ConnectionStore = require("devtools/client/app-manager/connection-store"); +const DeviceStore = require("devtools/client/app-manager/device-store"); +const simulatorsStore = require("devtools/client/app-manager/simulators-store"); +const adbStore = require("devtools/client/app-manager/builtin-adb-store"); window.addEventListener("unload", function onUnload() { window.removeEventListener("unload", onUnload); diff --git a/devtools/client/app-manager/content/device.js b/devtools/client/app-manager/content/device.js index 57c020631121..42eef0c7a46c 100644 --- a/devtools/client/app-manager/content/device.js +++ b/devtools/client/app-manager/content/device.js @@ -4,19 +4,19 @@ const Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); -const {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); +const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {}); -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -const {TargetFactory} = require("devtools/framework/target"); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +const {TargetFactory} = require("devtools/client/framework/target"); const {ConnectionManager, Connection} - = require("devtools/client/connection-manager"); + = require("devtools/shared/client/connection-manager"); const {getDeviceFront} = require("devtools/server/actors/device"); const {getTargetForApp, launchApp, closeApp} - = require("devtools/app-actor-front"); -const DeviceStore = require("devtools/app-manager/device-store"); -const WebappsStore = require("devtools/app-manager/webapps-store"); -const promise = require("devtools/toolkit/deprecated-sync-thenables"); + = require("devtools/shared/apps/app-actor-front"); +const DeviceStore = require("devtools/client/app-manager/device-store"); +const WebappsStore = require("devtools/client/app-manager/webapps-store"); +const promise = require("devtools/shared/deprecated-sync-thenables"); const DEFAULT_APP_ICON = "chrome://browser/skin/devtools/app-manager/default-app-icon.png"; window.addEventListener("message", function(event) { diff --git a/devtools/client/app-manager/content/index.js b/devtools/client/app-manager/content/index.js index d4bcefa51748..cbe980f49de5 100644 --- a/devtools/client/app-manager/content/index.js +++ b/devtools/client/app-manager/content/index.js @@ -3,11 +3,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const {utils: Cu, interfaces: Ci} = Components; -Cu.import("resource:///modules/devtools/gDevTools.jsm"); -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -const {Toolbox} = require("devtools/framework/toolbox"); -const {ConnectionManager, Connection} = require("devtools/client/connection-manager"); -const promise = require("devtools/toolkit/deprecated-sync-thenables"); +Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm"); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +const {Toolbox} = require("devtools/client/framework/toolbox"); +const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager"); +const promise = require("devtools/shared/deprecated-sync-thenables"); const prefs = require("sdk/preferences/service"); const Services = require("Services"); const Strings = Services.strings.createBundle("chrome://browser/locale/devtools/app-manager.properties"); diff --git a/devtools/client/app-manager/content/manifest-editor.js b/devtools/client/app-manager/content/manifest-editor.js index 37abe1d9f40a..8f8cdfead9a6 100644 --- a/devtools/client/app-manager/content/manifest-editor.js +++ b/devtools/client/app-manager/content/manifest-editor.js @@ -5,7 +5,7 @@ Cu.import("resource://gre/modules/osfile.jsm"); const {VariablesView} = - Cu.import("resource:///modules/devtools/VariablesView.jsm", {}); + Cu.import("resource:///modules/devtools/client/shared/widgets/VariablesView.jsm", {}); const VARIABLES_VIEW_URL = "chrome://devtools/content/shared/widgets/VariablesView.xul"; diff --git a/devtools/client/app-manager/content/projects.js b/devtools/client/app-manager/content/projects.js index 31c3b38a8e43..d6d9988900a2 100644 --- a/devtools/client/app-manager/content/projects.js +++ b/devtools/client/app-manager/content/projects.js @@ -6,18 +6,18 @@ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; const Cr = Components.results; -Cu.import("resource:///modules/devtools/gDevTools.jsm"); -const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -const {ConnectionManager, Connection} = require("devtools/client/connection-manager"); -const {AppProjects} = require("devtools/app-manager/app-projects"); -const {AppValidator} = require("devtools/app-manager/app-validator"); +Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm"); +const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager"); +const {AppProjects} = require("devtools/client/app-manager/app-projects"); +const {AppValidator} = require("devtools/client/app-manager/app-validator"); const {Services} = Cu.import("resource://gre/modules/Services.jsm"); const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm"); const {installHosted, installPackaged, getTargetForApp, - reloadApp, launchApp, closeApp} = require("devtools/app-actor-front"); -const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js"); + reloadApp, launchApp, closeApp} = require("devtools/shared/apps/app-actor-front"); +const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js"); -const promise = require("devtools/toolkit/deprecated-sync-thenables"); +const promise = require("devtools/shared/deprecated-sync-thenables"); const MANIFEST_EDITOR_ENABLED = "devtools.appmanager.manifestEditor.enabled"; diff --git a/devtools/client/app-manager/content/utils.js b/devtools/client/app-manager/content/utils.js index 4f6aa7683477..b64689e644cf 100644 --- a/devtools/client/app-manager/content/utils.js +++ b/devtools/client/app-manager/content/utils.js @@ -14,8 +14,8 @@ var Utils = (function() { const Cu = Components.utils; const {Services} = Cu.import("resource://gre/modules/Services.jsm", {}); - const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); - const EventEmitter = require("devtools/toolkit/event-emitter"); + const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); + const EventEmitter = require("devtools/shared/event-emitter"); function _createSetEventForwarder(key, finalStore) { diff --git a/devtools/client/app-manager/device-store.js b/devtools/client/app-manager/device-store.js index f3e2e581f174..6a9d9d93ce7f 100644 --- a/devtools/client/app-manager/device-store.js +++ b/devtools/client/app-manager/device-store.js @@ -2,9 +2,9 @@ * 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/. */ -const ObservableObject = require("devtools/shared/observable-object"); +const ObservableObject = require("devtools/client/shared/observable-object"); const {getDeviceFront} = require("devtools/server/actors/device"); -const {Connection} = require("devtools/client/connection-manager"); +const {Connection} = require("devtools/shared/client/connection-manager"); const {Cu} = require("chrome"); diff --git a/devtools/client/app-manager/moz.build b/devtools/client/app-manager/moz.build index 7d33c95625d6..ae52916dbe8e 100644 --- a/devtools/client/app-manager/moz.build +++ b/devtools/client/app-manager/moz.build @@ -7,7 +7,7 @@ BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini'] -EXTRA_JS_MODULES.devtools["app-manager"] += [ +DevToolsModules( 'app-projects.js', 'app-validator.js', 'builtin-adb-store.js', @@ -15,4 +15,4 @@ EXTRA_JS_MODULES.devtools["app-manager"] += [ 'device-store.js', 'simulators-store.js', 'webapps-store.js', -] +) diff --git a/devtools/client/app-manager/simulators-store.js b/devtools/client/app-manager/simulators-store.js index 867ec5d6f681..51a2c41fd75e 100644 --- a/devtools/client/app-manager/simulators-store.js +++ b/devtools/client/app-manager/simulators-store.js @@ -3,8 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const {Cu} = require("chrome"); -const ObservableObject = require("devtools/shared/observable-object"); -const {Simulator} = Cu.import("resource://gre/modules/devtools/Simulator.jsm"); +const ObservableObject = require("devtools/client/shared/observable-object"); +const {Simulator} = Cu.import("resource://gre/modules/devtools/shared/apps/Simulator.jsm"); var store = new ObservableObject({versions:[]}); diff --git a/devtools/client/app-manager/test/head.js b/devtools/client/app-manager/test/head.js index afe4acfd2339..5a0c099bf6ea 100644 --- a/devtools/client/app-manager/test/head.js +++ b/devtools/client/app-manager/test/head.js @@ -5,12 +5,12 @@ const {utils: Cu, classes: Cc, interfaces: Ci} = Components; const {Promise: promise} = - Cu.import("resource://gre/modules/devtools/deprecated-sync-thenables.js", {}); + Cu.import("resource://gre/modules/devtools/shared/deprecated-sync-thenables.js", {}); const {require} = - Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); -const {AppProjects} = require("devtools/app-manager/app-projects"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const {AppProjects} = require("devtools/client/app-manager/app-projects"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const APP_MANAGER_URL = "about:app-manager"; const TEST_BASE = diff --git a/devtools/client/app-manager/test/test_app_validator.html b/devtools/client/app-manager/test/test_app_validator.html index a5d97af928e2..a73cb1ba1093 100644 --- a/devtools/client/app-manager/test/test_app_validator.html +++ b/devtools/client/app-manager/test/test_app_validator.html @@ -18,9 +18,9 @@ const Cc = Components.classes; const Ci = Components.interfaces; Cu.import("resource://testing-common/httpd.js"); - const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); - const {AppValidator} = require("devtools/app-manager/app-validator"); + const {AppValidator} = require("devtools/client/app-manager/app-validator"); const {Services} = Cu.import("resource://gre/modules/Services.jsm"); const nsFile = Components.Constructor("@mozilla.org/file/local;1", "nsILocalFile", "initWithPath"); diff --git a/devtools/client/app-manager/test/test_connection_store.html b/devtools/client/app-manager/test/test_connection_store.html index 55925b2f4f54..7b2fb7ccfd65 100644 --- a/devtools/client/app-manager/test/test_connection_store.html +++ b/devtools/client/app-manager/test/test_connection_store.html @@ -25,7 +25,7 @@ Bug 901519 - [app manager] data store for connections diff --git a/devtools/shared/tests/unit/head_devtools.js b/devtools/shared/tests/unit/head_devtools.js index 07439b3c0e13..d89b4f1da556 100644 --- a/devtools/shared/tests/unit/head_devtools.js +++ b/devtools/shared/tests/unit/head_devtools.js @@ -4,8 +4,8 @@ const Ci = Components.interfaces; const Cu = Components.utils; const Cr = Components.results; -var {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); // Register a console listener, so console messages don't just disappear // into the ether. diff --git a/devtools/shared/tests/unit/test_async-utils.js b/devtools/shared/tests/unit/test_async-utils.js index f5b6c3b3c8eb..07cfa1d100e5 100644 --- a/devtools/shared/tests/unit/test_async-utils.js +++ b/devtools/shared/tests/unit/test_async-utils.js @@ -12,7 +12,7 @@ Object.defineProperty(this, "Promise", { value: require("promise"), writable: false, configurable: false }); -const {async, asyncOnce, promiseInvoke, promiseCall} = require("devtools/async-utils"); +const {async, asyncOnce, promiseInvoke, promiseCall} = require("devtools/shared/async-utils"); function run_test() { do_test_pending(); diff --git a/devtools/shared/tests/unit/test_consoleID.js b/devtools/shared/tests/unit/test_consoleID.js index 9285ba93b1f3..916b939654d6 100644 --- a/devtools/shared/tests/unit/test_consoleID.js +++ b/devtools/shared/tests/unit/test_consoleID.js @@ -1,9 +1,9 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ -const { console, ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm"); +const { console, ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm"); -const { ConsoleAPIListener } = require("devtools/toolkit/webconsole/utils"); +const { ConsoleAPIListener } = require("devtools/shared/webconsole/utils"); var seenMessages = 0; var seenTypes = 0; diff --git a/devtools/shared/tests/unit/test_cssColor.js b/devtools/shared/tests/unit/test_cssColor.js index 3db665673c80..e7b05c937b88 100644 --- a/devtools/shared/tests/unit/test_cssColor.js +++ b/devtools/shared/tests/unit/test_cssColor.js @@ -5,7 +5,7 @@ "use strict"; -const {colorUtils} = require("devtools/css-color"); +const {colorUtils} = require("devtools/shared/css-color"); const CLASSIFY_TESTS = [ { input: "rgb(255,0,192)", output: "rgb" }, diff --git a/devtools/shared/tests/unit/test_fetch-resource.js b/devtools/shared/tests/unit/test_fetch-resource.js index ed1f3df1b2fe..afbbfd518747 100644 --- a/devtools/shared/tests/unit/test_fetch-resource.js +++ b/devtools/shared/tests/unit/test_fetch-resource.js @@ -5,7 +5,7 @@ // Tests for DevToolsUtils.fetch on resource:// URI's. -const URL_FOUND = "resource://gre/modules/devtools/DevToolsUtils.js"; +const URL_FOUND = "resource://gre/modules/devtools/shared/DevToolsUtils.js"; const URL_NOT_FOUND = "resource://gre/modules/devtools/this/is/not/here.js"; /** diff --git a/devtools/shared/tests/unit/test_independent_loaders.js b/devtools/shared/tests/unit/test_independent_loaders.js index 17359eb5b928..901cd9c53850 100644 --- a/devtools/shared/tests/unit/test_independent_loaders.js +++ b/devtools/shared/tests/unit/test_independent_loaders.js @@ -10,8 +10,8 @@ function run_test() { let loader1 = new DevToolsLoader(); let loader2 = new DevToolsLoader(); - let color1 = loader1.require("devtools/css-color"); - let color2 = loader2.require("devtools/css-color"); + let color1 = loader1.require("devtools/shared/css-color"); + let color2 = loader2.require("devtools/shared/css-color"); do_check_true(color1 !== color2); diff --git a/devtools/shared/tests/unit/test_invisible_loader.js b/devtools/shared/tests/unit/test_invisible_loader.js index 92abded465d4..0788545e210c 100644 --- a/devtools/shared/tests/unit/test_invisible_loader.js +++ b/devtools/shared/tests/unit/test_invisible_loader.js @@ -18,7 +18,7 @@ function run_test() { function visible_loader() { let loader = new DevToolsLoader(); loader.invisibleToDebugger = false; - loader.require("devtools/css-color"); + loader.require("devtools/shared/css-color"); let dbg = new Debugger(); let sandbox = loader._provider.loader.sharedGlobalSandbox; @@ -34,7 +34,7 @@ function visible_loader() { function invisible_loader() { let loader = new DevToolsLoader(); loader.invisibleToDebugger = true; - loader.require("devtools/css-color"); + loader.require("devtools/shared/css-color"); let dbg = new Debugger(); let sandbox = loader._provider.loader.sharedGlobalSandbox; diff --git a/devtools/shared/tests/unit/test_prettifyCSS.js b/devtools/shared/tests/unit/test_prettifyCSS.js index 0f273777a2e6..176750be7faf 100644 --- a/devtools/shared/tests/unit/test_prettifyCSS.js +++ b/devtools/shared/tests/unit/test_prettifyCSS.js @@ -5,7 +5,7 @@ "use strict"; -const {CssLogic} = require("devtools/styleinspector/css-logic"); +const {CssLogic} = require("devtools/shared/styleinspector/css-logic"); const TESTS = [ diff --git a/devtools/shared/tests/unit/test_require.js b/devtools/shared/tests/unit/test_require.js index dd758fb5b475..25a2018f2191 100644 --- a/devtools/shared/tests/unit/test_require.js +++ b/devtools/shared/tests/unit/test_require.js @@ -9,8 +9,8 @@ function testBug1091706() { let loader = new DevToolsLoader(); let require = loader.require; - let color1 = require("devtools/css-color"); - let color2 = require("devtools/css-color"); + let color1 = require("devtools/shared/css-color"); + let color2 = require("devtools/shared/css-color"); do_check_true(color1 === color2); } diff --git a/devtools/shared/tests/unit/test_require_lazy.js b/devtools/shared/tests/unit/test_require_lazy.js index 41ed8cc1eaff..5c2bcd66430d 100644 --- a/devtools/shared/tests/unit/test_require_lazy.js +++ b/devtools/shared/tests/unit/test_require_lazy.js @@ -6,7 +6,7 @@ function run_test() { const name = "asyncUtils"; - const path = "devtools/async-utils"; + const path = "devtools/shared/async-utils"; const o = {}; devtools.lazyRequireGetter(o, name, path); const asyncUtils = require(path); diff --git a/devtools/shared/touch/moz.build b/devtools/shared/touch/moz.build index b46910ab118a..051e5a959498 100644 --- a/devtools/shared/touch/moz.build +++ b/devtools/shared/touch/moz.build @@ -4,7 +4,7 @@ # 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/. -EXTRA_JS_MODULES.devtools.touch += [ +DevToolsModules( 'simulator-content.js', 'simulator.js', -] +) diff --git a/devtools/shared/touch/simulator.js b/devtools/shared/touch/simulator.js index 0203ae49f664..f9b170fd5030 100644 --- a/devtools/shared/touch/simulator.js +++ b/devtools/shared/touch/simulator.js @@ -7,7 +7,7 @@ var { Ci } = require("chrome"); var promise = require("promise"); const FRAME_SCRIPT = - "resource://gre/modules/devtools/touch/simulator-content.js"; + "resource://gre/modules/devtools/shared/touch/simulator-content.js"; var trackedBrowsers = new WeakMap(); var savedTouchEventsEnabled = diff --git a/devtools/shared/transport/moz.build b/devtools/shared/transport/moz.build index 99a0fca25d9a..41e56c7a7cc8 100644 --- a/devtools/shared/transport/moz.build +++ b/devtools/shared/transport/moz.build @@ -6,8 +6,8 @@ XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] -EXTRA_JS_MODULES.devtools.transport += [ +DevToolsModules( 'packets.js', 'stream-utils.js', 'transport.js' -] +) diff --git a/devtools/shared/transport/packets.js b/devtools/shared/transport/packets.js index 927903afb8e1..56a5a9bd8768 100644 --- a/devtools/shared/transport/packets.js +++ b/devtools/shared/transport/packets.js @@ -25,9 +25,9 @@ */ const { Cc, Ci, Cu } = require("chrome"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const { dumpn, dumpv } = DevToolsUtils; -const StreamUtils = require("devtools/toolkit/transport/stream-utils"); +const StreamUtils = require("devtools/shared/transport/stream-utils"); const promise = require("promise"); DevToolsUtils.defineLazyGetter(this, "unicodeConverter", () => { diff --git a/devtools/shared/transport/stream-utils.js b/devtools/shared/transport/stream-utils.js index df294618a84d..d42dbc74671f 100644 --- a/devtools/shared/transport/stream-utils.js +++ b/devtools/shared/transport/stream-utils.js @@ -6,9 +6,9 @@ const { Ci, Cc, Cu, Cr, CC } = require("chrome"); const Services = require("Services"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const { dumpv } = DevToolsUtils; -const EventEmitter = require("devtools/toolkit/event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); const promise = require("promise"); DevToolsUtils.defineLazyGetter(this, "IOUtil", () => { diff --git a/devtools/shared/transport/tests/unit/head_dbg.js b/devtools/shared/transport/tests/unit/head_dbg.js index ae5acdd77a2e..c111b6b43095 100644 --- a/devtools/shared/transport/tests/unit/head_dbg.js +++ b/devtools/shared/transport/tests/unit/head_dbg.js @@ -9,12 +9,12 @@ const Cr = Components.results; const CC = Components.Constructor; const { require } = - Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const promise = require("promise"); const { Task } = Cu.import("resource://gre/modules/Task.jsm", {}); const Services = require("Services"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils.js"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); // We do not want to log packets by default, because in some tests, // we can be sending large amounts of data. The test harness has @@ -26,7 +26,7 @@ const DevToolsUtils = require("devtools/toolkit/DevToolsUtils.js"); Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true); const { DebuggerServer } = require("devtools/server/main"); -const { DebuggerClient } = require("devtools/toolkit/client/main"); +const { DebuggerClient } = require("devtools/shared/client/main"); function testExceptionHook(ex) { try { diff --git a/devtools/shared/transport/tests/unit/test_dbgsocket_connection_drop.js b/devtools/shared/transport/tests/unit/test_dbgsocket_connection_drop.js index 17956a584e34..cf92897c0453 100644 --- a/devtools/shared/transport/tests/unit/test_dbgsocket_connection_drop.js +++ b/devtools/shared/transport/tests/unit/test_dbgsocket_connection_drop.js @@ -8,7 +8,7 @@ * framed packet, i.e. when the length header is invalid. */ -const { RawPacket } = require("devtools/toolkit/transport/packets"); +const { RawPacket } = require("devtools/shared/transport/packets"); function run_test() { do_print("Starting test at " + new Date().toTimeString()); diff --git a/devtools/shared/transport/tests/unit/test_delimited_read.js b/devtools/shared/transport/tests/unit/test_delimited_read.js index 42c5678e3952..a1675638d159 100644 --- a/devtools/shared/transport/tests/unit/test_delimited_read.js +++ b/devtools/shared/transport/tests/unit/test_delimited_read.js @@ -1,7 +1,7 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ -const StreamUtils = require("devtools/toolkit/transport/stream-utils"); +const StreamUtils = require("devtools/shared/transport/stream-utils"); const StringInputStream = CC("@mozilla.org/io/string-input-stream;1", "nsIStringInputStream", "setData"); diff --git a/devtools/shared/transport/tests/unit/test_packet.js b/devtools/shared/transport/tests/unit/test_packet.js index a0ac8684a90b..7e1896555d6d 100644 --- a/devtools/shared/transport/tests/unit/test_packet.js +++ b/devtools/shared/transport/tests/unit/test_packet.js @@ -2,7 +2,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ const { JSONPacket, BulkPacket } = - require("devtools/toolkit/transport/packets"); + require("devtools/shared/transport/packets"); function run_test() { add_test(test_packet_done); diff --git a/devtools/shared/transport/transport.js b/devtools/shared/transport/transport.js index 19a1d02fc884..c7bd0e1574a3 100644 --- a/devtools/shared/transport/transport.js +++ b/devtools/shared/transport/transport.js @@ -14,7 +14,7 @@ factory.call(this, require, this); } else { const Cu = Components.utils; - const { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); factory.call(this, require, this); } } @@ -24,13 +24,13 @@ const { Cc, Ci, Cr, Cu, CC } = require("chrome"); const Services = require("Services"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const { dumpn, dumpv } = DevToolsUtils; -const StreamUtils = require("devtools/toolkit/transport/stream-utils"); +const StreamUtils = require("devtools/shared/transport/stream-utils"); const { Packet, JSONPacket, BulkPacket } = - require("devtools/toolkit/transport/packets"); + require("devtools/shared/transport/packets"); const promise = require("promise"); -const EventEmitter = require("devtools/toolkit/event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); DevToolsUtils.defineLazyGetter(this, "Pipe", () => { return CC("@mozilla.org/pipe;1", "nsIPipe", "init"); diff --git a/devtools/shared/webconsole/client.js b/devtools/shared/webconsole/client.js index 89823afef789..86fe80339bae 100644 --- a/devtools/shared/webconsole/client.js +++ b/devtools/shared/webconsole/client.js @@ -7,10 +7,10 @@ "use strict"; const {Cc, Ci, Cu} = require("chrome"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); -const EventEmitter = require("devtools/toolkit/event-emitter"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); +const EventEmitter = require("devtools/shared/event-emitter"); const promise = require("promise"); -const {LongStringClient} = require("devtools/toolkit/client/main"); +const {LongStringClient} = require("devtools/shared/client/main"); /** * A WebConsoleClient is used as a front end for the WebConsoleActor that is diff --git a/devtools/shared/webconsole/moz.build b/devtools/shared/webconsole/moz.build index e9f493d615a2..e068645865ca 100644 --- a/devtools/shared/webconsole/moz.build +++ b/devtools/shared/webconsole/moz.build @@ -8,11 +8,11 @@ if CONFIG['OS_TARGET'] != 'Android': MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] -EXTRA_JS_MODULES.devtools.toolkit.webconsole += [ +DevToolsModules( 'client.js', 'network-helper.js', 'network-monitor.js', 'server-logger-monitor.js', 'server-logger.js', 'utils.js', -] +) diff --git a/devtools/shared/webconsole/network-helper.js b/devtools/shared/webconsole/network-helper.js index f8f014ce741c..1e62623c7fd2 100644 --- a/devtools/shared/webconsole/network-helper.js +++ b/devtools/shared/webconsole/network-helper.js @@ -56,7 +56,7 @@ const {components, Cc, Ci, Cu} = require("chrome"); loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); // The cache used in the `nsIURL` function. const gNSURLStore = new Map(); diff --git a/devtools/shared/webconsole/network-monitor.js b/devtools/shared/webconsole/network-monitor.js index 5c3f62804fc7..964b7d73d306 100644 --- a/devtools/shared/webconsole/network-monitor.js +++ b/devtools/shared/webconsole/network-monitor.js @@ -11,10 +11,10 @@ const {Cc, Ci, Cu, Cr} = require("chrome"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); loader.lazyRequireGetter(this, "NetworkHelper", - "devtools/toolkit/webconsole/network-helper"); + "devtools/shared/webconsole/network-helper"); loader.lazyImporter(this, "Services", "resource://gre/modules/Services.jsm"); loader.lazyRequireGetter(this, "DevToolsUtils", - "devtools/toolkit/DevToolsUtils"); + "devtools/shared/DevToolsUtils"); loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm"); loader.lazyServiceGetter(this, "gActivityDistributor", "@mozilla.org/network/http-activity-distributor;1", diff --git a/devtools/shared/webconsole/server-logger-monitor.js b/devtools/shared/webconsole/server-logger-monitor.js index 4134fb7e18b3..5d5bc491d6da 100644 --- a/devtools/shared/webconsole/server-logger-monitor.js +++ b/devtools/shared/webconsole/server-logger-monitor.js @@ -10,9 +10,9 @@ const {Ci} = require("chrome"); const Services = require("Services"); const {DebuggerServer} = require("devtools/server/main"); -const {makeInfallible} = require("devtools/toolkit/DevToolsUtils"); +const {makeInfallible} = require("devtools/shared/DevToolsUtils"); -loader.lazyGetter(this, "NetworkHelper", () => require("devtools/toolkit/webconsole/network-helper")); +loader.lazyGetter(this, "NetworkHelper", () => require("devtools/shared/webconsole/network-helper")); // Helper tracer. Should be generic sharable by other modules (bug 1171927) const trace = { diff --git a/devtools/shared/webconsole/server-logger.js b/devtools/shared/webconsole/server-logger.js index f2e0300c0d1d..1217c34c9177 100644 --- a/devtools/shared/webconsole/server-logger.js +++ b/devtools/shared/webconsole/server-logger.js @@ -11,11 +11,11 @@ const {Class} = require("sdk/core/heritage"); const Services = require("Services"); const {DebuggerServer} = require("devtools/server/main"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); Cu.importGlobalProperties(["atob"]); -loader.lazyGetter(this, "NetworkHelper", () => require("devtools/toolkit/webconsole/network-helper")); +loader.lazyGetter(this, "NetworkHelper", () => require("devtools/shared/webconsole/network-helper")); // Helper tracer. Should be generic sharable by other modules (bug 1171927) const trace = { @@ -113,7 +113,7 @@ var ServerLoggingListener = Class({ trace.log("ServerLoggingListener.attachParentProcess;"); this.owner.conn.setupInParent({ - module: "devtools/toolkit/webconsole/server-logger-monitor", + module: "devtools/shared/webconsole/server-logger-monitor", setupParent: "setupParentProcess" }); diff --git a/devtools/shared/webconsole/test/common.js b/devtools/shared/webconsole/test/common.js index 0fce18d2de58..f3629db1f540 100644 --- a/devtools/shared/webconsole/test/common.js +++ b/devtools/shared/webconsole/test/common.js @@ -11,18 +11,18 @@ Cu.import("resource://gre/modules/Services.jsm"); const {Task} = Cu.import("resource://gre/modules/Task.jsm", {}); // This gives logging to stdout for tests -var {console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); +var {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}); -var {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -var WebConsoleUtils = require("devtools/toolkit/webconsole/utils").Utils; +var {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +var WebConsoleUtils = require("devtools/shared/webconsole/utils").Utils; var ConsoleAPIStorage = Cc["@mozilla.org/consoleAPI-storage;1"] .getService(Ci.nsIConsoleAPIStorage); var {DebuggerServer} = require("devtools/server/main"); -var {DebuggerClient, ObjectClient} = require("devtools/toolkit/client/main"); +var {DebuggerClient, ObjectClient} = require("devtools/shared/client/main"); var {ConsoleServiceListener, ConsoleAPIListener} = - require("devtools/toolkit/webconsole/utils"); + require("devtools/shared/webconsole/utils"); function initCommon() { diff --git a/devtools/shared/webconsole/test/test_commands_registration.html b/devtools/shared/webconsole/test/test_commands_registration.html index 163906a38b7e..05dd08c12531 100644 --- a/devtools/shared/webconsole/test/test_commands_registration.html +++ b/devtools/shared/webconsole/test/test_commands_registration.html @@ -18,8 +18,8 @@ SimpleTest.waitForExplicitFinish(); let gState; let tests; -let {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -let {WebConsoleCommands} = require("devtools/toolkit/webconsole/utils"); +let {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +let {WebConsoleCommands} = require("devtools/shared/webconsole/utils"); function evaluateJS(input) { return new Promise((resolve) => gState.client.evaluateJS(input, resolve)); diff --git a/devtools/shared/webconsole/test/test_consoleapi_innerID.html b/devtools/shared/webconsole/test/test_consoleapi_innerID.html index 49b9fa50e7d2..a4f2e4f803e1 100644 --- a/devtools/shared/webconsole/test/test_consoleapi_innerID.html +++ b/devtools/shared/webconsole/test/test_consoleapi_innerID.html @@ -18,7 +18,7 @@ let expectedConsoleCalls = []; function doConsoleCalls(aState) { - let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm", {}); + let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}); let console = new ConsoleAPI({ innerID: window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils) diff --git a/devtools/shared/webconsole/test/test_jsterm.html b/devtools/shared/webconsole/test/test_jsterm.html index d831fd2f0b48..6465985f908c 100644 --- a/devtools/shared/webconsole/test/test_jsterm.html +++ b/devtools/shared/webconsole/test/test_jsterm.html @@ -16,8 +16,8 @@ SimpleTest.waitForExplicitFinish(); let gState; -let {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -let {MAX_AUTOCOMPLETE_ATTEMPTS,MAX_AUTOCOMPLETIONS} = require("devtools/toolkit/webconsole/utils"); +let {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +let {MAX_AUTOCOMPLETE_ATTEMPTS,MAX_AUTOCOMPLETIONS} = require("devtools/shared/webconsole/utils"); // This test runs all of its assertions twice - once with // evaluateJS and once with evaluateJSAsync. diff --git a/devtools/shared/webconsole/test/unit/test_js_property_provider.js b/devtools/shared/webconsole/test/unit/test_js_property_provider.js index e0bd9ac9f3a2..545cfbc5a5ed 100644 --- a/devtools/shared/webconsole/test/unit/test_js_property_provider.js +++ b/devtools/shared/webconsole/test/unit/test_js_property_provider.js @@ -3,8 +3,8 @@ // http://creativecommons.org/publicdomain/zero/1.0/ "use strict"; -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); -const { JSPropertyProvider } = require("devtools/toolkit/webconsole/utils"); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +const { JSPropertyProvider } = require("devtools/shared/webconsole/utils"); Components.utils.import("resource://gre/modules/jsdebugger.jsm"); addDebuggerToGlobal(this); diff --git a/devtools/shared/webconsole/test/unit/test_network_helper.js b/devtools/shared/webconsole/test/unit/test_network_helper.js index 1204869f3f00..b07a913b8419 100644 --- a/devtools/shared/webconsole/test/unit/test_network_helper.js +++ b/devtools/shared/webconsole/test/unit/test_network_helper.js @@ -3,11 +3,11 @@ "use strict"; const Cu = Components.utils; -const { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/test/unit/test_security-info-certificate.js b/devtools/shared/webconsole/test/unit/test_security-info-certificate.js index 1f0b714fd4f7..12f11d50da72 100644 --- a/devtools/shared/webconsole/test/unit/test_security-info-certificate.js +++ b/devtools/shared/webconsole/test/unit/test_security-info-certificate.js @@ -6,11 +6,11 @@ // Tests that NetworkHelper.parseCertificateInfo parses certificate information // correctly. -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/test/unit/test_security-info-parser.js b/devtools/shared/webconsole/test/unit/test_security-info-parser.js index c3b432217b78..57bd41154ff7 100644 --- a/devtools/shared/webconsole/test/unit/test_security-info-parser.js +++ b/devtools/shared/webconsole/test/unit/test_security-info-parser.js @@ -5,12 +5,12 @@ // Test that NetworkHelper.parseSecurityInfo returns correctly formatted object. -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/test/unit/test_security-info-protocol-version.js b/devtools/shared/webconsole/test/unit/test_security-info-protocol-version.js index 20efde3f990b..557e13b8038d 100644 --- a/devtools/shared/webconsole/test/unit/test_security-info-protocol-version.js +++ b/devtools/shared/webconsole/test/unit/test_security-info-protocol-version.js @@ -6,11 +6,11 @@ // Tests that NetworkHelper.formatSecurityProtocol returns correct // protocol version strings. -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/test/unit/test_security-info-state.js b/devtools/shared/webconsole/test/unit/test_security-info-state.js index 0ea29da15725..898b9b8d3332 100644 --- a/devtools/shared/webconsole/test/unit/test_security-info-state.js +++ b/devtools/shared/webconsole/test/unit/test_security-info-state.js @@ -6,12 +6,12 @@ // Tests that security info parser gives correct general security state for // different cases. -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/test/unit/test_security-info-static-hpkp.js b/devtools/shared/webconsole/test/unit/test_security-info-static-hpkp.js index d06e99d0f207..b07fdc2538ce 100644 --- a/devtools/shared/webconsole/test/unit/test_security-info-static-hpkp.js +++ b/devtools/shared/webconsole/test/unit/test_security-info-static-hpkp.js @@ -5,13 +5,13 @@ // Test that NetworkHelper.parseSecurityInfo correctly detects static hpkp pins -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/test/unit/test_security-info-weakness-reasons.js b/devtools/shared/webconsole/test/unit/test_security-info-weakness-reasons.js index c37fd439956e..ce84937663e8 100644 --- a/devtools/shared/webconsole/test/unit/test_security-info-weakness-reasons.js +++ b/devtools/shared/webconsole/test/unit/test_security-info-weakness-reasons.js @@ -6,11 +6,11 @@ // Tests that NetworkHelper.getReasonsForWeakness returns correct reasons for // weak requests. -const { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); Object.defineProperty(this, "NetworkHelper", { get: function() { - return require("devtools/toolkit/webconsole/network-helper"); + return require("devtools/shared/webconsole/network-helper"); }, configurable: true, writeable: false, diff --git a/devtools/shared/webconsole/utils.js b/devtools/shared/webconsole/utils.js index 0ae9d0ea0478..9e34534e60ff 100644 --- a/devtools/shared/webconsole/utils.js +++ b/devtools/shared/webconsole/utils.js @@ -7,7 +7,7 @@ "use strict"; const {Cc, Ci, Cu, components} = require("chrome"); -const {isWindowIncluded} = require("devtools/toolkit/layout/utils"); +const {isWindowIncluded} = require("devtools/shared/layout/utils"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -15,8 +15,8 @@ loader.lazyImporter(this, "Services", "resource://gre/modules/Services.jsm"); // TODO: Bug 842672 - browser/ imports modules from toolkit/. // Note that these are only used in WebConsoleCommands, see $0 and pprint(). -loader.lazyImporter(this, "VariablesView", "resource:///modules/devtools/VariablesView.jsm"); -const DevToolsUtils = require("devtools/toolkit/DevToolsUtils"); +loader.lazyImporter(this, "VariablesView", "resource:///modules/devtools/client/shared/widgets/VariablesView.jsm"); +const DevToolsUtils = require("devtools/shared/DevToolsUtils"); // Match the function name from the result of toString() or toSource(). // diff --git a/devtools/shared/worker-loader.js b/devtools/shared/worker-loader.js index c0ec1f287c19..9278ba80fc4b 100644 --- a/devtools/shared/worker-loader.js +++ b/devtools/shared/worker-loader.js @@ -494,12 +494,18 @@ this.worker = new WorkerDebuggerLoader({ "xpcInspector": xpcInspector }, paths: { + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ "": "resource://gre/modules/commonjs/", - "devtools": "resource:///modules/devtools", - "devtools/server": "resource://gre/modules/devtools/server", - "devtools/toolkit": "resource://gre/modules/devtools", + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ + "devtools": "resource://gre/modules/devtools", + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ + "devtools/client": "resource:///modules/devtools/client", + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ "promise": "resource://gre/modules/Promise-backend.js", - "source-map": "resource://gre/modules/devtools/source-map", + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ + "source-map": "resource://gre/modules/devtools/sourcemap/source-map.js", + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ "xpcshell-test": "resource://test" + // ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠ } }); diff --git a/devtools/templates.mozbuild b/devtools/templates.mozbuild new file mode 100644 index 000000000000..3d604768175c --- /dev/null +++ b/devtools/templates.mozbuild @@ -0,0 +1,31 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +@template +def DevToolsModules(*modules): + '''Installs JS modules at a resource:// path that corresponds directly to + their source tree location. + + For this to work as intended, a moz.build file should be placed in each + source directory which uses this template to install only the JS files in + its own directory. Subdirectories should use their own moz.build. + + By following this pattern, there's less magic to require() and resource:// + paths, since they now match the source tree. + + Currently `DevToolsModules` can only be called once per moz.build, so we + build a list manually above. Bug 1198013 tracks fixing this to make it more + like other moz.build constructs.''' + + for m in modules: + if '/' in m: + error('DevToolsModules must be used from the same directory as ' + + 'the files to be installed.') + + base = EXTRA_JS_MODULES + for dir in RELATIVEDIR.split('/'): + base = base[dir] + base += [m for m in modules] diff --git a/dom/manifest/ManifestProcessor.jsm b/dom/manifest/ManifestProcessor.jsm index 4b938fb2e49a..7aa2ef3f432e 100644 --- a/dom/manifest/ManifestProcessor.jsm +++ b/dom/manifest/ManifestProcessor.jsm @@ -32,7 +32,7 @@ const orientationTypes = new Set(['any', 'natural', 'landscape', 'portrait', 'portrait-primary', 'portrait-secondary', 'landscape-primary', 'landscape-secondary' ]); -Cu.import('resource://gre/modules/devtools/Console.jsm'); +Cu.import('resource://gre/modules/devtools/shared/Console.jsm'); // ValueExtractor is used by the various processors to get values // from the manifest and to report errors. Cu.import('resource://gre/modules/ValueExtractor.jsm'); diff --git a/js/xpconnect/tests/chrome/test_onGarbageCollection.html b/js/xpconnect/tests/chrome/test_onGarbageCollection.html index 06cb3fdf418f..cd32210d8b75 100644 --- a/js/xpconnect/tests/chrome/test_onGarbageCollection.html +++ b/js/xpconnect/tests/chrome/test_onGarbageCollection.html @@ -13,7 +13,7 @@ SimpleTest.waitForExplicitFinish(); const Cu = Components.utils; - Cu.import("resource://gre/modules/devtools/Loader.jsm"); + Cu.import("resource://gre/modules/devtools/shared/Loader.jsm"); const require = devtools.require; const { gc } = Cu.getJSTestingFunctions(); diff --git a/mobile/android/chrome/content/EmbedRT.js b/mobile/android/chrome/content/EmbedRT.js index b3f6ec69a592..25e8a70ba7ac 100644 --- a/mobile/android/chrome/content/EmbedRT.js +++ b/mobile/android/chrome/content/EmbedRT.js @@ -4,7 +4,7 @@ "use strict"; XPCOMUtils.defineLazyModuleGetter(this, "ConsoleAPI", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); /* * Collection of methods and features specific to using a GeckoView instance. diff --git a/mobile/android/chrome/content/RemoteDebugger.js b/mobile/android/chrome/content/RemoteDebugger.js index c92ae9eba018..73c82c751f87 100644 --- a/mobile/android/chrome/content/RemoteDebugger.js +++ b/mobile/android/chrome/content/RemoteDebugger.js @@ -6,7 +6,7 @@ "use strict"; XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => { - let { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); + let { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); let { DebuggerServer } = require("devtools/server/main"); return DebuggerServer; }); diff --git a/mobile/android/tests/browser/chrome/test_debugger_server.html b/mobile/android/tests/browser/chrome/test_debugger_server.html index 38b5097e634e..fab9bc964eef 100644 --- a/mobile/android/tests/browser/chrome/test_debugger_server.html +++ b/mobile/android/tests/browser/chrome/test_debugger_server.html @@ -20,7 +20,7 @@ Migrated from Robocop: https://bugzilla.mozilla.org/show_bug.cgi?id=1184186 Cu.import("resource://gre/modules/Services.jsm"); const { DebuggerServer } = - Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {}); + Cu.import("resource://gre/modules/devtools/server/dbg-server.jsm", {}); let win = Services.wm.getMostRecentWindow("navigator:browser"); diff --git a/testing/marionette/driver.js b/testing/marionette/driver.js index 8cee66e78756..02e199046dff 100644 --- a/testing/marionette/driver.js +++ b/testing/marionette/driver.js @@ -16,8 +16,8 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Task.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -var {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); -this.DevToolsUtils = devtools.require("devtools/toolkit/DevToolsUtils.js"); +var {devtools} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); +this.DevToolsUtils = devtools.require("devtools/shared/DevToolsUtils"); XPCOMUtils.defineLazyServiceGetter( this, "cookieManager", "@mozilla.org/cookiemanager;1", "nsICookieManager2"); diff --git a/testing/marionette/server.js b/testing/marionette/server.js index 65c91c087ba6..ba3ce3cc3a39 100644 --- a/testing/marionette/server.js +++ b/testing/marionette/server.js @@ -18,7 +18,7 @@ Cu.import("chrome://marionette/content/elements.js"); Cu.import("chrome://marionette/content/simpletest.js"); // Bug 1083711: Load transport.js as an SDK module instead of subscript -loader.loadSubScript("resource://gre/modules/devtools/transport/transport.js"); +loader.loadSubScript("resource://gre/modules/devtools/shared/transport/transport.js"); // Preserve this import order: var events = {}; diff --git a/testing/mochitest/browser-test.js b/testing/mochitest/browser-test.js index 201a0e9f123b..bc1f0c45f6dc 100644 --- a/testing/mochitest/browser-test.js +++ b/testing/mochitest/browser-test.js @@ -31,7 +31,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "SelfSupportBackend", var nativeConsole = console; XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); const SIMPLETEST_OVERRIDES = ["ok", "is", "isnot", "todo", "todo_is", "todo_isnot", "info", "expectAssertions", "requestCompleteLog"]; diff --git a/testing/talos/talos/page_load_test/devtools/addon/content/damp.js b/testing/talos/talos/page_load_test/devtools/addon/content/damp.js index 6417fad85f03..a18203fc5004 100644 --- a/testing/talos/talos/page_load_test/devtools/addon/content/damp.js +++ b/testing/talos/talos/page_load_test/devtools/addon/content/damp.js @@ -1,7 +1,7 @@ -Components.utils.import("resource:///modules/devtools/gDevTools.jsm"); +Components.utils.import("resource:///modules/devtools/client/framework/gDevTools.jsm"); const {devtools} = - Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); + Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { getActiveTab } = devtools.require("sdk/tabs/utils"); const { getMostRecentBrowserWindow } = devtools.require("sdk/window/utils"); diff --git a/testing/xpcshell/dbg-actors.js b/testing/xpcshell/dbg-actors.js index 48eb5659e548..c3f0b8c2044f 100644 --- a/testing/xpcshell/dbg-actors.js +++ b/testing/xpcshell/dbg-actors.js @@ -6,7 +6,7 @@ const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {}); var { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); -const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { RootActor } = devtools.require("devtools/server/actors/root"); const { BrowserTabList } = devtools.require("devtools/server/actors/webbrowser"); diff --git a/testing/xpcshell/head.js b/testing/xpcshell/head.js index 8c5a3d3a7cd4..6b8ae88727e2 100644 --- a/testing/xpcshell/head.js +++ b/testing/xpcshell/head.js @@ -379,7 +379,7 @@ function _setupDebuggerServer(breakpointFiles, callback) { prefs.setBoolPref("devtools.debugger.log.verbose", true); } - let { require } = Components.utils.import("resource://gre/modules/devtools/Loader.jsm", {}); + let { require } = Components.utils.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); let { DebuggerServer } = require("devtools/server/main"); let { OriginalLocation } = require("devtools/server/actors/common"); DebuggerServer.init(); diff --git a/toolkit/components/addoncompat/CompatWarning.jsm b/toolkit/components/addoncompat/CompatWarning.jsm index 870fb89d0ec0..d0d7db4da1fa 100644 --- a/toolkit/components/addoncompat/CompatWarning.jsm +++ b/toolkit/components/addoncompat/CompatWarning.jsm @@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Preferences.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); function section(number, url) { diff --git a/toolkit/components/extensions/Extension.jsm b/toolkit/components/extensions/Extension.jsm index 4bec8897796c..b528832d9e8e 100644 --- a/toolkit/components/extensions/Extension.jsm +++ b/toolkit/components/extensions/Extension.jsm @@ -21,7 +21,7 @@ const Cr = Components.results; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/devtools/event-emitter.js"); +Cu.import("resource://gre/modules/devtools/shared/event-emitter.js"); XPCOMUtils.defineLazyModuleGetter(this, "Locale", "resource://gre/modules/Locale.jsm"); diff --git a/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm b/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm index 36769183feb3..6d9d10888d21 100644 --- a/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm +++ b/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm @@ -12,11 +12,11 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "devtools", - "resource://gre/modules/devtools/Loader.jsm"); + "resource://gre/modules/devtools/shared/Loader.jsm"); Object.defineProperty(this, "WebConsoleUtils", { get: function() { - return devtools.require("devtools/toolkit/webconsole/utils").Utils; + return devtools.require("devtools/shared/webconsole/utils").Utils; }, configurable: true, enumerable: true diff --git a/toolkit/components/passwordmgr/LoginHelper.jsm b/toolkit/components/passwordmgr/LoginHelper.jsm index 563c675f5237..578d5fce2a14 100644 --- a/toolkit/components/passwordmgr/LoginHelper.jsm +++ b/toolkit/components/passwordmgr/LoginHelper.jsm @@ -44,7 +44,7 @@ this.LoginHelper = { }; // Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref. - let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI; + let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI; let consoleOptions = { maxLogLevel: getMaxLogLevel(), prefix: aLogPrefix, diff --git a/toolkit/components/perfmonitoring/AddonWatcher.jsm b/toolkit/components/perfmonitoring/AddonWatcher.jsm index 06a404d4f4dc..2a3e13ef4a2a 100644 --- a/toolkit/components/perfmonitoring/AddonWatcher.jsm +++ b/toolkit/components/perfmonitoring/AddonWatcher.jsm @@ -16,7 +16,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Preferences", XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PerformanceStats", "resource://gre/modules/PerformanceStats.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "Telemetry", diff --git a/toolkit/components/places/PlacesTransactions.jsm b/toolkit/components/places/PlacesTransactions.jsm index 3d4b2d5787a0..d8fd910735fc 100644 --- a/toolkit/components/places/PlacesTransactions.jsm +++ b/toolkit/components/places/PlacesTransactions.jsm @@ -185,7 +185,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); Components.utils.importGlobalProperties(["URL"]); diff --git a/toolkit/components/processsingleton/ContentProcessSingleton.js b/toolkit/components/processsingleton/ContentProcessSingleton.js index 1e713cce8318..a3cc1ea8cdec 100644 --- a/toolkit/components/processsingleton/ContentProcessSingleton.js +++ b/toolkit/components/processsingleton/ContentProcessSingleton.js @@ -66,7 +66,7 @@ ContentProcessSingleton.prototype = { // load devtools component on-demand // Only reply if we are in a real content process if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) { - let {init} = Cu.import("resource://gre/modules/devtools/content-server.jsm", {}); + let {init} = Cu.import("resource://gre/modules/devtools/server/content-server.jsm", {}); init(message); } }, diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index f797933a31ad..ff6b75bf0511 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -353,7 +353,7 @@ PopupBlocking.init(); XPCOMUtils.defineLazyGetter(this, "console", () => { // Set up console.* for frame scripts. - let Console = Components.utils.import("resource://gre/modules/devtools/Console.jsm", {}); + let Console = Components.utils.import("resource://gre/modules/devtools/shared/Console.jsm", {}); return new Console.ConsoleAPI(); }); diff --git a/toolkit/modules/Sqlite.jsm b/toolkit/modules/Sqlite.jsm index bd51d4866f0a..462300a1f6c6 100644 --- a/toolkit/modules/Sqlite.jsm +++ b/toolkit/modules/Sqlite.jsm @@ -36,7 +36,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "FinalizationWitnessService", XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils", "resource://gre/modules/PromiseUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "console", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); // Counts the number of created connections per database basename(). This is // used for logging to distinguish connection instances. diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index 49ce10ee86c2..b5ae72e73f66 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm"); XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function () { - return Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", {}). + return Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm", {}). BrowserToolboxProcess; }); XPCOMUtils.defineLazyModuleGetter(this, "Experiments", diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 1d50c88be8f3..f9e4e583b5e5 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -39,9 +39,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task", XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess", - "resource:///modules/devtools/ToolboxProcess.jsm"); + "resource:///modules/devtools/client/framework/ToolboxProcess.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "ConsoleAPI", - "resource://gre/modules/devtools/Console.jsm"); + "resource://gre/modules/devtools/shared/Console.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "Blocklist", "@mozilla.org/extensions/blocklist;1", diff --git a/webapprt/RemoteDebugger.jsm b/webapprt/RemoteDebugger.jsm index b377452e4941..ba7dfa78329d 100644 --- a/webapprt/RemoteDebugger.jsm +++ b/webapprt/RemoteDebugger.jsm @@ -12,7 +12,7 @@ var Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -var { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); var { DebuggerServer } = require("devtools/server/main"); this.RemoteDebugger = { diff --git a/webapprt/content/dbg-webapp-actors.js b/webapprt/content/dbg-webapp-actors.js index 447b912265d2..cc1018f1a251 100644 --- a/webapprt/content/dbg-webapp-actors.js +++ b/webapprt/content/dbg-webapp-actors.js @@ -5,7 +5,7 @@ 'use strict'; const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {}); -const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); const { BrowserTabActor, BrowserTabList, allAppShellDOMWindows, sendShutdownEvent } = devtools.require("devtools/server/actors/webbrowser"); const { RootActor } = devtools.require("devtools/server/actors/root"); diff --git a/webapprt/test/chrome/browser_debugger.js b/webapprt/test/chrome/browser_debugger.js index c2530f913380..5e9e79c184f8 100644 --- a/webapprt/test/chrome/browser_debugger.js +++ b/webapprt/test/chrome/browser_debugger.js @@ -1,7 +1,7 @@ Cu.import("resource://gre/modules/Services.jsm"); -var { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); +var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}); var { DebuggerServer } = require("devtools/server/main"); -var { DebuggerClient } = require("devtools/toolkit/client/main"); +var { DebuggerClient } = require("devtools/shared/client/main"); var { RemoteDebugger } = Cu.import("resource://webapprt/modules/RemoteDebugger.jsm", {}); function test() {