зеркало из https://github.com/mozilla/gecko-dev.git
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
38da3c9b42
Firefox.exe has its own function table of Kernel32's functions so that we can use them before the executable's import table is resolved. The table is in the shared secion, where the launcher process puts the offsets of the functions and the browser process resolves them to the function addresses. The problem is when the browser process calls `GetDependentModulePaths` to get the list of dependent modules that is also in the shared section, it remapped the write-copy view to get the list visible in the mapped view. As a side-effect of this remapping, the function addresses are gone and the browser process cannot use the `RedirectToNoOpEntryPoint` blocking technique. This is not a problem in the production environment, but it caused GTest failures. After I examined the events carefully as below, it turns out that this remapping is not really needed because `GetDependentModulePaths` is used when we launch a child process with pre-spawn CIG, which is long after all the dependent modules are loaded. 1. Browser process gets a writeble handle via the shared section 2. Add dependent modules to the writable view (before the process's entrypoint) 3. `firefox!wmain` calls `ConvertToReadOnly()` to convert the writable handle to a readonly handle 4. The first module loading maps a write-copy view, which contains a complete list of the dependent modules 5. Or, the first call to `GetDependentModulePaths()` maps a write-copy view (No need to remap the view here) When the browser process calls `GetDependentModulePaths`, the list of the dependent modules are complete and there is no needed to remap it. The proposed fix is to remove the line remapping the section. Differential Revision: https://phabricator.services.mozilla.com/D130433 |
||
---|---|---|
.cargo | ||
.vscode | ||
accessible | ||
browser | ||
build | ||
caps | ||
chrome | ||
config | ||
devtools | ||
docs | ||
docshell | ||
dom | ||
editor | ||
extensions | ||
gfx | ||
gradle/wrapper | ||
hal | ||
image | ||
intl | ||
ipc | ||
js | ||
layout | ||
media | ||
memory | ||
mfbt | ||
mobile | ||
modules | ||
mozglue | ||
netwerk | ||
nsprpub | ||
other-licenses | ||
parser | ||
python | ||
remote | ||
security | ||
services | ||
servo | ||
startupcache | ||
storage | ||
taskcluster | ||
testing | ||
third_party | ||
toolkit | ||
tools | ||
uriloader | ||
view | ||
widget | ||
xpcom | ||
xpfe/appshell | ||
.arcconfig | ||
.babel-eslint.rc.js | ||
.clang-format | ||
.clang-format-ignore | ||
.cron.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flake8 | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.hg-annotate-ignore-revs | ||
.hg-format-source | ||
.hgignore | ||
.hgtags | ||
.lando.ini | ||
.lldbinit | ||
.mailmap | ||
.prettierignore | ||
.prettierrc | ||
.taskcluster.yml | ||
.trackerignore | ||
.yamllint | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
CLOBBER | ||
Cargo.lock | ||
Cargo.toml | ||
GNUmakefile | ||
LICENSE | ||
Makefile.in | ||
README.txt | ||
aclocal.m4 | ||
build.gradle | ||
client.mk | ||
client.py | ||
configure.in | ||
configure.py | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
mach | ||
mach.ps1 | ||
moz.build | ||
moz.configure | ||
mozilla-config.h.in | ||
old-configure.in | ||
package-lock.json | ||
package.json | ||
settings.gradle | ||
substitute-local-geckoview.gradle | ||
test.mozbuild |
README.txt
An explanation of the Firefox Source Code Directory Structure and links to project pages with documentation can be found at: https://firefox-source-docs.mozilla.org/contributing/directory_structure.html For information on how to build Firefox from the source code and create the patch see: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html If you have a question about developing Firefox, and can't find the solution on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel. Nightly development builds can be downloaded from: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://www.mozilla.org/firefox/channel/desktop/#nightly Keep in mind that nightly builds, which are used by Firefox developers for testing, may be buggy.