Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Bug 1395741 - migrate from sdk-loader to devtools loader;r=ochameau #34

Merged
merged 1 commit into from Sep 8, 2017

Conversation

juliandescottes
Copy link
Contributor

I have tested this both with the latest central and with an older Nightly that didn't have resource://devtools/shared/base-loader.js

In both cases I could see my android runtime and connect to it.

bootstrap.js Outdated
return Cu.import("resource://devtools/shared/base-loader.js", {});
} catch (e) {
// Firefox 56 and older, use the addon-sdk loader.
return Cu.import('resource://gre/modules/commonjs/toolkit/loader.js').Loader;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Use " (The old version was wrong too...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

bootstrap.js Outdated
unload = loaderModule.unload;

let loaderOptions = {
paths: {
"./": uri,
"": "resource://gre/modules/commonjs/"
// Remove when Firefox 56 is no longer supported.
"": "resource://gre/modules/commonjs/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, isn't this for using SDK modules only? Aren't they already removed? I would think this bit can already be removed...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we still have a module.exports = require("sdk/event/core"); for backward compatibility.

But I will move the resource:// prefix to this require, it will be easier to get rid of pre FF57 code this way.

@juliandescottes juliandescottes force-pushed the nosdk-loader branch 3 times, most recently from d2272d0 to f5e55e1 Compare September 7, 2017 21:55
@juliandescottes
Copy link
Contributor Author

For the record, I retested after fixing the first batch of review comments.

Copy link
Contributor

@ochameau ochameau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks!

@ochameau ochameau merged commit d30734f into mozilla:master Sep 8, 2017
@juliandescottes juliandescottes deleted the nosdk-loader branch September 8, 2017 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants