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
Go to file
Boris Zbarsky f8e0094981 Bug 1528456. Fix browser_domainPolicy.js to not be racy. r=Gijs
The old complicated code here was working around a fundamental race in the
test.  The test was trying to do the following:

1)  Open a new tab.  This sends an IPC message to do that and to start loading
about:blank in the tab.

2)  Add a "load" listener.  This sends an IPC message to add the listener.

3)  Start loading the URL we really want to load.  This sends an IPC message to
start the load.

There are two races here: the message from step 2 can be received before or
after the about:blank load is done, and the message from step 3 can be received
before or after the about:blank load is done.  If step 2 wins the race (we add
the listener before the about:blank load is done) but step 3 loses the race
(new load starts only after the about:blank load is done), then we would get a
load event for the about:blank, not for the url we care about.

The test worked around this by having step 2 add a listener for the
"DOMDocElementInserted" event, which about:blank did not fire.  Then when that
happened (indicating that the load from step 3 is now in progress), it added a
"load" listener.  This fixed the race.

Bug 1528146 fixed about:blank to also fire "DOMDocElementInserted", so the test
became racy again.  Now if the "DOMDocElementInserted" listener got added
_after_ the about:blank load had fired that event (which is what usually
happened), then the test passed.  But if the IPC message from step 2 to add the
"DOMDocElementInserted" listener won the race against the about:blank load
firing "DOMDocElementInserted", then we added the "load" listener too early and
got the "load" event for the about:blank, not the document we cared about.

The fix is to just use the (now) existing openNewForegroundTab function which
lets us pass in a url, then wait until that URL is loaded, instead of trying to
reinvent that wheel.

There is an additional ride-along change to make openNewForegroundTab always
create a new process in this test, which is the original intent of the test but
wasn't necessarily guaranteed by the old code.

Differential Revision: https://phabricator.services.mozilla.com/D20544

--HG--
extra : moz-landing-system : lando
2019-02-20 20:12:16 +00:00
.cargo Backed out 2 changesets (bug 1529117) for failures on webdriver/tests/new_session/invalid_capabilities.py. CLOSED TREE 2019-02-20 18:20:49 +02:00
.vscode Bug 1514820 - Recommend a VSCode extension for IDL language highlighting r=jya 2018-12-18 19:43:33 +00:00
accessible Backed out changeset ac4f1b5527fd (bug 1525470) for failures in geckoview in org.mozilla.geckoview.test.AccessibilityTest.testCheckbox. CLOSED TREE 2019-02-20 02:53:14 +02:00
browser Backed out 6 changesets (bug 1304001) for mochitest failures in test_bug430351.html CLOSED TREE 2019-02-21 04:04:47 +02:00
build Bug 1507235 - Add capability to run telemetry-tests-client locally; r=raphael 2019-02-20 19:18:06 +00:00
caps Bug 1346759 - Use URI comparison for null principals instead of pointer comparison. r=ckerschb,bholley 2019-02-11 18:03:12 +00:00
chrome Backed out 79 changesets (bug 1524687, bug 1524688) for crashes on mozilla::dom::ScreenOrientation::ScreenOrientation(nsPIDOMWindowInner *,nsScreen *). CLOSED TREE 2019-02-14 11:50:23 +02:00
config Bug 1528028 - Remove obsolete Shark profiling support r=tcampbell 2019-02-19 19:56:48 +00:00
db Bug 1526125 - Upgrade to SQLite 3.27.1. r=mak 2019-02-15 08:45:10 +00:00
devtools Bug 1521507 - Add telemetry events for runtime update;r=daisuke,janerik,chutten 2019-02-20 20:09:34 +00:00
docshell Bug 1528916: Explicitly set LoadInfo for about:crashcontent and about:crashparent. r=gijs 2019-02-19 10:26:54 +01:00
dom Bug 1528456. Fix browser_domainPolicy.js to not be racy. r=Gijs 2019-02-20 20:12:16 +00:00
editor Bug 1470926 - Null-check mBoundFrame after calling SetSelectionRange on it. r=TYLin 2019-02-21 00:18:15 +00:00
embedding Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-01-24 08:11:00 +00:00
extensions Backed out 79 changesets (bug 1524687, bug 1524688) for crashes on mozilla::dom::ScreenOrientation::ScreenOrientation(nsPIDOMWindowInner *,nsScreen *). CLOSED TREE 2019-02-14 11:50:23 +02:00
gfx Bug 1428158 - Fix static analysis errors in Android widgetry code. r=snorp 2019-02-20 19:58:15 +00:00
gradle/wrapper Bug 1509572 - Part 1: Bump Gradle wrapper to 4.10.2; decouple script from Gradle version. r=snorp 2018-11-26 21:42:27 +00:00
hal Bug 1523974 - Map PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE to BELOW_NORMAL_PRIORITY_CLASS on Windows. r=gsvelto 2019-02-04 22:54:05 +00:00
image Bug 1500692 - Add GRAPHICS subcategories. r=njn,mattwoodrow 2019-02-16 17:38:23 +00:00
intl Backed out changeset cfb1a7fbbfa7 (bug 1517493) for bc failures in browser/base/content/test/static/browser_all_files_referenced.js 2019-02-18 22:49:05 +02:00
ipc Bug 1528665 - Remove GetAndroidSystemInfo sync IPC. r=geckoview-reviewers,mccr8,snorp 2019-02-19 21:19:14 +00:00
js Bug 1428158 - Fix static analysis errors in arm64 JIT code. r=nbp 2019-02-20 19:58:24 +00:00
layout Bug 1526097 - Remove nsIFrame::eBlockFrame flag. r=dholbert 2019-02-20 21:18:14 +00:00
media Bug 1527633 - rename GetRTPStats to something less ambiguous r=dminor 2019-02-13 16:35:12 +00:00
memory Bug 1512504 - Remove support for MSVC. r=froydnj 2019-02-14 21:45:27 +00:00
mfbt Merge mozilla-inbound to mozilla-central. a=merge 2019-02-15 03:41:17 +02:00
mobile Bug 1428158 - Enable static analysis on Android. r=glandium 2019-02-20 20:03:52 +00:00
modules Bug 1528712 - Remove a couple trivial dependencies on nsPresContext. r=heycam 2019-02-19 14:54:01 +01:00
mozglue Bug 1528651 - Re-enable warnings-as-errors on Windows in some directories. r=dmajor 2019-02-17 15:03:02 +09:00
netwerk Bug 1529274 - Remove debugging code for bug 1153929 r=JuniorHsu 2019-02-20 21:02:23 +00:00
nsprpub Bug 1526010, Upgrade Firefox 67 to use NSPR 4.21. Beta snapshot, r=me 2019-02-09 13:26:00 +01:00
other-licenses Bug 1523118 atk: Implement scrollsubstringto ATK API. r=surkov 2019-01-26 20:38:53 +01:00
parser Backed out 79 changesets (bug 1524687, bug 1524688) for crashes on mozilla::dom::ScreenOrientation::ScreenOrientation(nsPIDOMWindowInner *,nsScreen *). CLOSED TREE 2019-02-14 11:50:23 +02:00
python Bug 1491004 - Exclude Visual Studio files from coverage instrumentation. r=chmanchester,calixte,glandium 2019-02-20 12:18:56 +00:00
security Bug 1525636, Replace ondialogextra1 and ondialogextra2 attributes with event handlers, r=Gijs 2019-02-20 11:11:31 +00:00
services Bug 1528704 - Add option to disable sync on RemoteSettings().get() r=glasserc 2019-02-20 15:15:00 +00:00
servo Bug 1529058 - Use Rust types from transform-origin / perspective-origin. r=mattwoodrow 2019-02-19 20:28:47 +00:00
startupcache Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
storage Backed out 79 changesets (bug 1524687, bug 1524688) for crashes on mozilla::dom::ScreenOrientation::ScreenOrientation(nsPIDOMWindowInner *,nsScreen *). CLOSED TREE 2019-02-14 11:50:23 +02:00
taskcluster Bug 1522111 - Followup, improve SETA algorithm a bit more by treating opt low value as low value for pgo as well. Unless there is a high value task to override. r=jmaher 2019-02-20 17:16:43 +00:00
testing Bug 1507235 - Add capability to run telemetry-tests-client locally; r=raphael 2019-02-20 19:18:06 +00:00
third_party Backed out 2 changesets (bug 1529117) for failures on webdriver/tests/new_session/invalid_capabilities.py. CLOSED TREE 2019-02-20 18:20:49 +02:00
toolkit Bug 1521507 - Add telemetry events for runtime update;r=daisuke,janerik,chutten 2019-02-20 20:09:34 +00:00
tools Bug 1528857 - Setting env-var "MOZ_PROFILER_SYMBOLICATE" forces pre-symbolication of output profiles - r=mstange 2019-02-20 21:38:23 +00:00
uriloader Bug 1528814: Serialize Loadinfo for PExternalHelperApp. r=mayhemer 2019-02-18 18:11:22 +01:00
view Bug 1506508 - Make PresShell::EventHandler::HandleEvent() flush any dirty region before deciding to event target of eMouseDown and eMouseUp r=smaug 2019-02-11 23:25:45 +00:00
widget Bug 1428158 - Fix static analysis errors in Android widgetry code. r=snorp 2019-02-20 19:58:15 +00:00
xpcom Bug 1528665 - Remove GetAndroidSystemInfo sync IPC. r=geckoview-reviewers,mccr8,snorp 2019-02-19 21:19:14 +00:00
xpfe/appshell Bug 1524683 - Move all nsIFrameLoaderOwner references to nsFrameLoaderOwner; r=nika 2019-02-15 22:20:53 +00:00
.arcconfig
.clang-format Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
.clang-format-ignore Bug 1528492 - Add cbor-cpp to the thirdparty list r=jcj 2019-02-17 01:03:40 +00:00
.cron.yml Bug 1514087: [taskgraph] Add an option to not optimize target tasks in cron graphs; r=dustin 2018-12-26 14:43:34 +00:00
.eslintignore Backed out changeset 74922ea29d44 (bug 1490671) for browser-chrome failures in browser/components/preferences/in-content/tests/browser_sync_pairing.js 2019-02-20 02:43:16 +02:00
.eslintrc.js Bug 1515942 - Enable ESLint for gfx/ (manual fixes). r=kats 2018-12-27 09:45:01 +00:00
.flake8 Bug 1515746 - [flake8] Unsupport subdir .flake8 files and use new 'per-file-ignores' config instead, r=egao 2019-02-07 20:17:02 +00:00
.gdbinit
.gdbinit_python
.git-blame-ignore-revs Merge mozilla-inbound to mozilla-central. a=merge 2019-01-22 05:56:10 +02:00
.gitignore Bug 1513450 - Do not ignore .rej/.orig files. r=firefox-build-system-reviewers,nalexander 2018-12-17 21:41:01 +00:00
.hg-annotate-ignore-revs Bug 1508324 - Generate list of past changesets to be skipped for blame. r=me NPOTB DONTBUILD 2018-12-27 18:08:25 -02:00
.hg-format-source Bug 1511181 - Quick fix for .hg-format-source that has an empty line. r=ehsan, a=aryx 2018-11-30 13:25:44 +02:00
.hgignore Bug 1525638 - Let hg ignore the build directories of WebRender standalone builds. r=ted 2019-02-11 13:37:44 +00:00
.hgtags No bug - Tagging mozilla-central 5d9c5aa981a5b824e6132c923c2f201b3fa49397 with FIREFOX_NIGHTLY_66_END a=release DONTBUILD CLOSED TREE 2019-01-28 04:56:31 -08:00
.lldbinit
.mailmap
.taskcluster.yml Bug 1524358 - get commit message locally, rather than from task parameters r=tomprince 2019-02-01 23:27:48 +00:00
.trackerignore
.yamllint
.ycm_extra_conf.py Bug 1522135 - Make .ycm_extra_conf.py work with python3. r=jgraham 2019-01-24 13:51:28 +01:00
aclocal.m4 Bug 1519603 - Manually inline AC_OUTPUT_SUBDIRS and MOZ_RUN_ALL_SUBCONFIGURES. r=nalexander 2019-01-14 18:37:06 +00:00
AUTHORS
build.gradle Bug 1514374 - Remove workaround for accessibility-test-framework. r=nalexander,geckoview-reviewers,snorp 2019-02-20 17:44:23 +00:00
Cargo.lock Backed out 2 changesets (bug 1529117) for failures on webdriver/tests/new_session/invalid_capabilities.py. CLOSED TREE 2019-02-20 18:20:49 +02:00
Cargo.toml Backed out 2 changesets (bug 1529117) for failures on webdriver/tests/new_session/invalid_capabilities.py. CLOSED TREE 2019-02-20 18:20:49 +02:00
client.mk Bug 1498031 - Merge code paths for running configure between Tup and Make based backends. r=firefox-build-system-reviewers,mshal 2018-10-16 22:21:36 +00:00
client.py
CLOBBER Bug 1524688: Follow-up: Touch CLOBBER. r=bustage 2019-02-15 00:44:46 -08:00
configure.in
configure.py Bug 1528241 - Add a trace mode to python configure that logs internal values. r=chmanchester 2019-02-20 07:46:22 +09:00
GNUmakefile
gradle.properties Bug 1527896 - Increase Gradle heaps to handle large assets. r=nalexander 2019-02-14 18:21:13 +00:00
gradlew
LEGAL
LICENSE
mach
Makefile.in Bug 1512504 - Remove support for MSVC. r=froydnj 2019-02-14 21:45:27 +00:00
moz.build Bug 1507334 - Add mozconfigs for 3-stage PGO; r=firefox-build-system-reviewers,chmanchester#firefox-build-system-reviewers 2019-01-10 01:34:49 +00:00
moz.configure Bug 1512504 - Remove support for MSVC. r=froydnj 2019-02-14 21:45:27 +00:00
mozilla-config.h.in Bug 1504022 - Map GetExceptionCode to a nop to avoid an error r=bobowen 2018-11-02 13:28:01 -05:00
old-configure.in Merge mozilla-central to autoland. 2019-02-15 20:50:34 +02:00
package-lock.json Bug 1517707. Update ESLint related modules to latest versions. r=mossop 2019-01-04 16:44:49 +00:00
package.json Bug 1517707. Update ESLint related modules to latest versions. r=mossop 2019-01-04 16:44:49 +00:00
README.txt Bug 1480997 - Remove "Mozilla FTP server" link in README.txt r=mossop 2018-10-23 10:06:29 +00:00
settings.gradle
test.mozbuild

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    https://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    https://developer.mozilla.org/en/docs/Creating_a_patch
    https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

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 Mozilla developers for
testing, may be buggy.