Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 5e0cd4c

Browse files
committed
Merge mozilla-central to mozilla-inbound. on a CLOSED TREE
2 parents deeddf1 + b2d3591 commit 5e0cd4c

File tree

329 files changed

+3473
-1243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+3473
-1243
lines changed

Cargo.lock

Lines changed: 32 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

browser/base/content/test/performance/browser.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ prefs =
1717
support-files =
1818
head.js
1919
[browser_appmenu.js]
20-
skip-if = asan || debug || (os == 'win' && bits == 32) # Bug 1382809, bug 1369959, Win32 because of intermittent OOM failures
20+
skip-if = asan || debug || (os == 'win' && bits == 32) || (os == 'win' && processor == 'aarch64') # Bug 1382809, bug 1369959, Win32 because of intermittent OOM failures, bug 1533141 for aarch64
2121
[browser_preferences_usage.js]
2222
skip-if = !debug
2323
[browser_startup.js]

browser/base/content/test/plugins/browser.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ tags = blocklist
8787
skip-if = !e10s
8888
tags = blocklist
8989
[browser_enable_DRM_prompt.js]
90+
skip-if = (os == 'win' && processor == 'aarch64') # bug 1533164
9091
[browser_private_browsing_eme_persistent_state.js]
9192
[browser_globalplugin_crashinfobar.js]
9293
skip-if = !crashreporter

build/moz.configure/bindgen.configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cbindgen = check_prog('CBINDGEN', ['cbindgen'], paths=toolchain_search_path,
1414
@checking('cbindgen version')
1515
@imports(_from='textwrap', _import='dedent')
1616
def cbindgen_version(cbindgen):
17-
cbindgen_min_version = Version('0.7.1')
17+
cbindgen_min_version = Version('0.8.2')
1818

1919
# cbindgen x.y.z
2020
version = Version(check_cmd_output(cbindgen, '--version').strip().split(" ")[1])
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Build GeckoView Example
2+
3+
## When do you need to build GeckoView Example
4+
5+
If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it without building your GeckoView Example. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging-new`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build GeckoView Example and deploy it on a test device.
6+
7+
## Setup your environment
8+
9+
This will be a short documentation focused on the typical patches you may write for about:debugging. For a more complete documentation, you can refer to https://mozilla.github.io/geckoview/ and https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build.
10+
11+
The whole setup needs to download several gigabytes of dependencies so try to have a fast internet connection to follow those steps.
12+
13+
### Clone mozilla-central
14+
15+
It is recommended to create a new clone of mozilla-central for your GeckoView Example builds.
16+
17+
```
18+
hg clone https://hg.mozilla.org/mozilla-central mozilla-central-gecko-view
19+
cd mozilla-central-gecko-view
20+
```
21+
22+
### Run bootstrap
23+
24+
Next simply run `mach bootstrap` and select the third option `3. GeckoView/Firefox for Android Artifact Mode`
25+
26+
```
27+
> ./mach bootstrap
28+
Please choose the version of Firefox you want to build:
29+
1. Firefox for Desktop Artifact Mode
30+
2. Firefox for Desktop
31+
3. GeckoView/Firefox for Android Artifact Mode
32+
4. GeckoView/Firefox for Android
33+
> 3
34+
```
35+
36+
Follow the instructions, it will take some time as it needs to download a lot of dependencies. At the end it will provide you with a template you should use to create a `.mozconfig` file. You can use the proposed content without changing anything.
37+
38+
### Enable USB debugging on your phone
39+
40+
If you already used your device for USB debugging, this should already be enabled, but we will repeat the steps here.
41+
42+
In the Settings menu, choose "About" and scroll down to the Build Number option. There's a hidden option there to activate "developer mode": tap the Build Number option seven times. You’ll see a countdown, and then a "Developer Options" menu will appear in your Settings. Don’t worry — you can turn this off whenever you like. The last step is to enable USB Debugging in the Developer Options menu.
43+
44+
## Build and deploy to your phone
45+
46+
Connect your phone to your computer with a USB cable. Then run:
47+
48+
```
49+
./mach build
50+
./mach package
51+
./mach android install-geckoview_example
52+
```
53+
54+
At this step if you go to the list of applications on your phone, you should be able to spot a "GeckoView Example" application.
55+
56+
## Reflect changes
57+
58+
If you change server files that impact GeckoView, you need to build and install again. Reflect the changes by:
59+
60+
```
61+
./mach build faster
62+
./mach package
63+
./mach android install-geckoview_example
64+
```
65+
66+
Once you built all, the changes under `devtools/server` and `devtools/shared` can be built with `faster` option. This should be faster.
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Build GeckoView Reference Browser
2+
3+
## When do you need to build GeckoView Reference Browser
4+
5+
If a remote debugging change impacts the server (file located in `devtools/server` or in `devtools/shared`), you will not be able to test it without building your GeckoView Reference Browser. For the purpose of remote debugging, your local build of Firefox Desktop where you will test about:debugging runs the content of `devtools/client` (including `devtools/client/aboutdebugging-new`). And `devtools/server` runs on the device. So as soon as you are developing or testing a patch that needs to update the server and is about USB debugging, you need to build GeckoView Reference Browser and deploy it on a test device. To build custom Reference Browser, need two modules of GeckoView and Reference Browser.
6+
7+
## Setup your environment and build
8+
9+
This will be a short documentation focused on the typical patches you may write for about:debugging. For a more complete documentation, you can refer to https://mozilla.github.io/geckoview/ and https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build.
10+
11+
The whole setup needs to download several gigabytes of dependencies so try to have a fast internet connection to follow those steps.
12+
13+
### Make empty directory
14+
15+
It is recommended to create a new directory to build your GeckoView and Reference Browser.
16+
17+
```
18+
mkdir geckoview-reference-browser
19+
cd geckoview-reference-browser
20+
```
21+
22+
### Build GeckoView
23+
24+
#### Clone mozilla-central
25+
26+
It is recommended to create a new clone of mozilla-central for your GeckoView builds.
27+
28+
```
29+
hg clone https://hg.mozilla.org/mozilla-central mozilla-central-gecko-view
30+
cd mozilla-central-gecko-view
31+
```
32+
33+
#### Run bootstrap
34+
35+
Next simply run `mach bootstrap` and select the third option `3. GeckoView/Firefox for Android Artifact Mode`
36+
37+
```
38+
> ./mach bootstrap
39+
Please choose the version of Firefox you want to build:
40+
1. Firefox for Desktop Artifact Mode
41+
2. Firefox for Desktop
42+
3. GeckoView/Firefox for Android Artifact Mode
43+
4. GeckoView/Firefox for Android
44+
> 3
45+
```
46+
47+
Follow the instructions, it will take some time as it needs to download a lot of dependencies. At the end it will provide you with a template you should use to create a `.mozconfig` file. You can use the proposed content without changing anything.
48+
49+
### Build
50+
51+
Execute command below to build.
52+
53+
```
54+
./mach build
55+
./mach package
56+
./mach android archive-geckoview
57+
```
58+
59+
If the build has finished successfully, the GeckoView AAR file will be created in your build output directory. You can find this file with following command:
60+
61+
```
62+
> ls mozilla-central-gecko-view/<your-output-directory>/gradle/build/mobile/android/geckoview/outputs/aar
63+
geckoview-withGeckoBinaries-debug.aar
64+
```
65+
66+
67+
### Build Reference Browser
68+
69+
#### Clone reference-browser
70+
71+
It is recommended to create a new clone of reference-browser for your Reference Browser builds.
72+
73+
```
74+
cd ../
75+
git clone https://github.com/mozilla-mobile/reference-browser
76+
cd reference-browser
77+
```
78+
79+
#### Create `local.properties` file
80+
81+
`local.properties` file is necessary to specify the location of the Android SDK. Please write the absolute path of Android SDK with `sdk.dir` key. If you did `./mach bootstrap` once, Android SDK should already installed. You can find the directory whose name is like `android-sdk-<os-name>` under `~/.mozconfig/`. Thus, in mac osx case, the content of `local.properties` should be like below:
82+
83+
```
84+
sdk.dir=/Users/xxxxxx/.mozbuild/android-sdk-osx
85+
```
86+
87+
#### Edit `app/build.gradle` to build Reference Browser with above GeckoView
88+
89+
You need to edit two places in `app/build.gradle`.
90+
91+
1. Add `repositories` block with following content to bottom of file. <absolute path to AAR> is the directory which was created by `./mach android archive-geckoview` to build GeckoView. This should be like `/User/xxxxxx/mozilla-central-gecko-view/<your-output-directory>/gradle/build/mobile/android/geckoview/outputs/aar`.
92+
93+
```
94+
repositories {
95+
flatDir(
96+
name: "localBuild",
97+
dirs: "<absolute path to AAR>"
98+
)
99+
}
100+
```
101+
102+
2. Edit `geckoNightlyArmImplementation`
103+
104+
```
105+
dependencies {
106+
// ...
107+
108+
//geckoNightlyArmImplementation Gecko.geckoview_nightly_arm
109+
geckoNightlyArmImplementation(
110+
name: 'geckoview-withGeckoBinaries-debug',
111+
ext: 'aar'
112+
)
113+
114+
// ...
115+
}
116+
```
117+
118+
#### Build and deploy to your phone
119+
120+
Connect your phone to your computer with a USB cable. Then run:
121+
122+
```
123+
./gradlew build
124+
./gradlew installGeckoNightlyArmDebug
125+
```
126+
127+
At this step if you go to the list of applications on your phone, you should be able to spot a "Reference Browser" application.
128+
129+
### Enable USB debugging on your phone
130+
131+
If you already used your device for USB debugging, this should already be enabled, but we will repeat the steps here.
132+
133+
In the Settings menu, choose "About" and scroll down to the Build Number option. There's a hidden option there to activate "developer mode": tap the Build Number option seven times. You’ll see a countdown, and then a "Developer Options" menu will appear in your Settings. Don’t worry — you can turn this off whenever you like. The last step is to enable USB Debugging in the Developer Options menu on Reference Browser on your device.
134+
135+
And, you can test with Reference Browser with custom GeckoView!
136+
137+
## Reflect changes
138+
139+
If you change codes in GeckoView, need to build and install again. Reflect the changes by:
140+
141+
```
142+
cd mozilla-central-gecko-view
143+
./mach build faster
144+
./mach package
145+
./mach android archive-geckoview
146+
cd ../
147+
cd reference-browser
148+
./gradlew build
149+
./gradlew installGeckoNightlyArmDebug
150+
```
151+
152+
Once you built all, the changes under `devtools/server` and `devtools/shared` can build with `faster` option. This should be faster.

0 commit comments

Comments
 (0)