mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
Backed out 6 changesets (bug 1650118) as per Aaron's request. CLOSED TREE
Backed out changeset 4a7fc6398ad6 (bug 1650118) Backed out changeset b9fa3dd9c05d (bug 1650118) Backed out changeset 2cb9109dee0a (bug 1650118) Backed out changeset a6ca38804021 (bug 1650118) Backed out changeset 66b9527aecad (bug 1650118) Backed out changeset 74fd3eb970a6 (bug 1650118)
This commit is contained in:
parent
4ad583397b
commit
5e0d52e2cc
@ -632,6 +632,7 @@ package org.mozilla.geckoview {
|
|||||||
method @Nullable public Rect getScreenSizeOverride();
|
method @Nullable public Rect getScreenSizeOverride();
|
||||||
method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
|
method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
|
||||||
method public boolean getUseMaxScreenDepth();
|
method public boolean getUseMaxScreenDepth();
|
||||||
|
method @Deprecated public boolean getUseMultiprocess();
|
||||||
method public boolean getWebFontsEnabled();
|
method public boolean getWebFontsEnabled();
|
||||||
method public boolean getWebManifestEnabled();
|
method public boolean getWebManifestEnabled();
|
||||||
method @NonNull public GeckoRuntimeSettings setAboutConfigEnabled(boolean);
|
method @NonNull public GeckoRuntimeSettings setAboutConfigEnabled(boolean);
|
||||||
@ -684,6 +685,7 @@ package org.mozilla.geckoview {
|
|||||||
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
|
method @NonNull public GeckoRuntimeSettings.Builder screenSizeOverride(int, int);
|
||||||
method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
|
method @NonNull public GeckoRuntimeSettings.Builder telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
|
||||||
method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
|
method @NonNull public GeckoRuntimeSettings.Builder useMaxScreenDepth(boolean);
|
||||||
|
method @Deprecated @NonNull public GeckoRuntimeSettings.Builder useMultiprocess(boolean);
|
||||||
method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
|
method @NonNull public GeckoRuntimeSettings.Builder webFontsEnabled(boolean);
|
||||||
method @NonNull public GeckoRuntimeSettings.Builder webManifest(boolean);
|
method @NonNull public GeckoRuntimeSettings.Builder webManifest(boolean);
|
||||||
method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
|
method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
|
||||||
|
@ -31,6 +31,7 @@ class ContentCrashTest : BaseSessionTest() {
|
|||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@Test
|
@Test
|
||||||
fun crashContent() {
|
fun crashContent() {
|
||||||
|
assumeTrue(sessionRule.env.isMultiprocess)
|
||||||
// We need the crash reporter for this test
|
// We need the crash reporter for this test
|
||||||
assumeTrue(BuildConfig.MOZ_CRASHREPORTER)
|
assumeTrue(BuildConfig.MOZ_CRASHREPORTER)
|
||||||
|
|
||||||
|
@ -119,6 +119,9 @@ class ContentDelegateMultipleSessionsTest : BaseSessionTest() {
|
|||||||
|
|
||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@Test fun crashContentMultipleSessions() {
|
@Test fun crashContentMultipleSessions() {
|
||||||
|
// This test doesn't make sense without multiprocess
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
|
|
||||||
val newSession = getSecondGeckoSession()
|
val newSession = getSecondGeckoSession()
|
||||||
|
|
||||||
// We can inadvertently catch the `onCrash` call for the cached session if we don't specify
|
// We can inadvertently catch the `onCrash` call for the cached session if we don't specify
|
||||||
@ -158,6 +161,8 @@ class ContentDelegateMultipleSessionsTest : BaseSessionTest() {
|
|||||||
|
|
||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@Test fun killContentMultipleSessions() {
|
@Test fun killContentMultipleSessions() {
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
|
|
||||||
val newSession = getSecondGeckoSession()
|
val newSession = getSecondGeckoSession()
|
||||||
|
|
||||||
val mainSessionKilled = GeckoResult<Void>()
|
val mainSessionKilled = GeckoResult<Void>()
|
||||||
|
@ -111,6 +111,9 @@ class ContentDelegateTest : BaseSessionTest() {
|
|||||||
|
|
||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@Test fun crashContent() {
|
@Test fun crashContent() {
|
||||||
|
// This test doesn't make sense without multiprocess
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
|
|
||||||
mainSession.loadUri(CONTENT_CRASH_URL)
|
mainSession.loadUri(CONTENT_CRASH_URL)
|
||||||
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
||||||
@AssertCalled(count = 1)
|
@AssertCalled(count = 1)
|
||||||
@ -134,6 +137,9 @@ class ContentDelegateTest : BaseSessionTest() {
|
|||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@WithDisplay(width = 10, height = 10)
|
@WithDisplay(width = 10, height = 10)
|
||||||
@Test fun crashContent_tapAfterCrash() {
|
@Test fun crashContent_tapAfterCrash() {
|
||||||
|
// This test doesn't make sense without multiprocess
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
|
|
||||||
mainSession.delegateUntilTestEnd(object : Callbacks.ContentDelegate {
|
mainSession.delegateUntilTestEnd(object : Callbacks.ContentDelegate {
|
||||||
override fun onCrash(session: GeckoSession) {
|
override fun onCrash(session: GeckoSession) {
|
||||||
mainSession.open()
|
mainSession.open()
|
||||||
@ -164,6 +170,8 @@ class ContentDelegateTest : BaseSessionTest() {
|
|||||||
|
|
||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@Test fun killContent() {
|
@Test fun killContent() {
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
|
|
||||||
killAllContentProcesses()
|
killAllContentProcesses()
|
||||||
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
||||||
@AssertCalled(count = 1)
|
@AssertCalled(count = 1)
|
||||||
|
@ -1637,6 +1637,8 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
|
|||||||
|
|
||||||
@IgnoreCrash
|
@IgnoreCrash
|
||||||
@Test fun contentCrashIgnored() {
|
@Test fun contentCrashIgnored() {
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
|
|
||||||
mainSession.loadUri(CONTENT_CRASH_URL)
|
mainSession.loadUri(CONTENT_CRASH_URL)
|
||||||
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
||||||
@AssertCalled(count = 1)
|
@AssertCalled(count = 1)
|
||||||
@ -1646,6 +1648,7 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
|
|||||||
|
|
||||||
@Test(expected = ChildCrashedException::class)
|
@Test(expected = ChildCrashedException::class)
|
||||||
fun contentCrashFails() {
|
fun contentCrashFails() {
|
||||||
|
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||||
assumeThat(sessionRule.env.shouldShutdownOnCrash(), equalTo(false))
|
assumeThat(sessionRule.env.shouldShutdownOnCrash(), equalTo(false))
|
||||||
|
|
||||||
sessionRule.session.loadUri(CONTENT_CRASH_URL)
|
sessionRule.session.loadUri(CONTENT_CRASH_URL)
|
||||||
|
@ -38,6 +38,12 @@ public class Environment {
|
|||||||
return !getEnvVar("MOZ_CRASHREPORTER_SHUTDOWN").isEmpty();
|
return !getEnvVar("MOZ_CRASHREPORTER_SHUTDOWN").isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMultiprocess() {
|
||||||
|
return Boolean.valueOf(InstrumentationRegistry.getArguments()
|
||||||
|
.getString("use_multiprocess",
|
||||||
|
"true"));
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isDebugging() {
|
public boolean isDebugging() {
|
||||||
return Debug.isDebuggerConnected();
|
return Debug.isDebuggerConnected();
|
||||||
}
|
}
|
||||||
|
@ -159,6 +159,7 @@ public class RuntimeCreator {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
final GeckoRuntimeSettings runtimeSettings = new GeckoRuntimeSettings.Builder()
|
final GeckoRuntimeSettings runtimeSettings = new GeckoRuntimeSettings.Builder()
|
||||||
|
.useMultiprocess(env.isMultiprocess())
|
||||||
.contentBlocking(new ContentBlocking.Settings.Builder()
|
.contentBlocking(new ContentBlocking.Settings.Builder()
|
||||||
.safeBrowsingProviders(googleLegacy, google)
|
.safeBrowsingProviders(googleLegacy, google)
|
||||||
.build())
|
.build())
|
||||||
|
@ -294,7 +294,10 @@ public final class GeckoRuntime implements Parcelable {
|
|||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(LOGTAG, "init");
|
Log.d(LOGTAG, "init");
|
||||||
}
|
}
|
||||||
int flags = GeckoThread.FLAG_PRELOAD_CHILD;
|
int flags = 0;
|
||||||
|
if (settings.getUseMultiprocess()) {
|
||||||
|
flags |= GeckoThread.FLAG_PRELOAD_CHILD;
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.getPauseForDebuggerEnabled()) {
|
if (settings.getPauseForDebuggerEnabled()) {
|
||||||
flags |= GeckoThread.FLAG_DEBUGGING;
|
flags |= GeckoThread.FLAG_DEBUGGING;
|
||||||
|
@ -45,6 +45,22 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
|
|||||||
return new GeckoRuntimeSettings(settings);
|
return new GeckoRuntimeSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set whether multiprocess support should be enabled.
|
||||||
|
*
|
||||||
|
* @param use A flag determining whether multiprocess should be enabled.
|
||||||
|
* Default is true.
|
||||||
|
* @return This Builder instance.
|
||||||
|
*
|
||||||
|
* @deprecated This method will be removed in GeckoView 82, at which point GeckoView will
|
||||||
|
* only operate in multiprocess mode.
|
||||||
|
*/
|
||||||
|
@Deprecated // Bug 1650118
|
||||||
|
public @NonNull Builder useMultiprocess(final boolean use) {
|
||||||
|
getSettings().mUseMultiprocess.set(use);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the custom Gecko process arguments.
|
* Set the custom Gecko process arguments.
|
||||||
*
|
*
|
||||||
@ -487,6 +503,8 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
|
|||||||
"general.aboutConfig.enable", false);
|
"general.aboutConfig.enable", false);
|
||||||
/* package */ final Pref<Boolean> mForceUserScalable = new Pref<>(
|
/* package */ final Pref<Boolean> mForceUserScalable = new Pref<>(
|
||||||
"browser.ui.zoom.force-user-scalable", false);
|
"browser.ui.zoom.force-user-scalable", false);
|
||||||
|
/* package */ final Pref<Boolean> mUseMultiprocess = new Pref<>(
|
||||||
|
"browser.tabs.remote.autostart", true);
|
||||||
/* package */ final Pref<Boolean> mAutofillLogins = new Pref<Boolean>(
|
/* package */ final Pref<Boolean> mAutofillLogins = new Pref<Boolean>(
|
||||||
"signon.autofillForms", true);
|
"signon.autofillForms", true);
|
||||||
|
|
||||||
@ -559,6 +577,20 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
|
|||||||
commitResetPrefs();
|
commitResetPrefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether multiprocess is enabled.
|
||||||
|
*
|
||||||
|
* @return true if multiprocess is enabled, false otherwise.
|
||||||
|
*
|
||||||
|
* @deprecated This method will be removed in GeckoView 82, at which point GeckoView will only
|
||||||
|
* operate in multiprocess mode.
|
||||||
|
*/
|
||||||
|
@Deprecated // Bug 1650118
|
||||||
|
public boolean getUseMultiprocess() {
|
||||||
|
return mUseMultiprocess.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom Gecko process arguments.
|
* Get the custom Gecko process arguments.
|
||||||
*
|
*
|
||||||
|
@ -1031,7 +1031,7 @@ public class GeckoSession {
|
|||||||
Compositor compositor, EventDispatcher dispatcher,
|
Compositor compositor, EventDispatcher dispatcher,
|
||||||
SessionAccessibility.NativeProvider sessionAccessibility,
|
SessionAccessibility.NativeProvider sessionAccessibility,
|
||||||
GeckoBundle initData, String id, String chromeUri,
|
GeckoBundle initData, String id, String chromeUri,
|
||||||
int screenId, boolean privateMode);
|
int screenId, boolean privateMode, boolean isRemote);
|
||||||
|
|
||||||
@Override // JNIObject
|
@Override // JNIObject
|
||||||
public void disposeNative() {
|
public void disposeNative() {
|
||||||
@ -1301,6 +1301,7 @@ public class GeckoSession {
|
|||||||
final String chromeUri = mSettings.getChromeUri();
|
final String chromeUri = mSettings.getChromeUri();
|
||||||
final int screenId = mSettings.getScreenId();
|
final int screenId = mSettings.getScreenId();
|
||||||
final boolean isPrivate = mSettings.getUsePrivateMode();
|
final boolean isPrivate = mSettings.getUsePrivateMode();
|
||||||
|
final boolean isRemote = runtime.getSettings().getUseMultiprocess();
|
||||||
|
|
||||||
mWindow = new Window(runtime, this, mNativeQueue);
|
mWindow = new Window(runtime, this, mNativeQueue);
|
||||||
mWebExtensionController.setRuntime(runtime);
|
mWebExtensionController.setRuntime(runtime);
|
||||||
@ -1310,7 +1311,7 @@ public class GeckoSession {
|
|||||||
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
|
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
|
||||||
Window.open(mWindow, mNativeQueue, mCompositor, mEventDispatcher,
|
Window.open(mWindow, mNativeQueue, mCompositor, mEventDispatcher,
|
||||||
mAccessibility != null ? mAccessibility.nativeProvider : null,
|
mAccessibility != null ? mAccessibility.nativeProvider : null,
|
||||||
createInitData(), mId, chromeUri, screenId, isPrivate);
|
createInitData(), mId, chromeUri, screenId, isPrivate, isRemote);
|
||||||
} else {
|
} else {
|
||||||
GeckoThread.queueNativeCallUntil(
|
GeckoThread.queueNativeCallUntil(
|
||||||
GeckoThread.State.PROFILE_READY,
|
GeckoThread.State.PROFILE_READY,
|
||||||
@ -1324,7 +1325,7 @@ public class GeckoSession {
|
|||||||
GeckoBundle.class, createInitData(),
|
GeckoBundle.class, createInitData(),
|
||||||
String.class, mId,
|
String.class, mId,
|
||||||
String.class, chromeUri,
|
String.class, chromeUri,
|
||||||
screenId, isPrivate);
|
screenId, isPrivate, isRemote);
|
||||||
}
|
}
|
||||||
|
|
||||||
onWindowChanged(WINDOW_OPEN, /* inProgress */ false);
|
onWindowChanged(WINDOW_OPEN, /* inProgress */ false);
|
||||||
|
@ -37,9 +37,6 @@ exclude: true
|
|||||||
- Added [`Loader#headerFilter`][83.9] to override the default header filtering
|
- Added [`Loader#headerFilter`][83.9] to override the default header filtering
|
||||||
behavior.
|
behavior.
|
||||||
([bug 1667471]({{bugzilla}}1667471))
|
([bug 1667471]({{bugzilla}}1667471))
|
||||||
- ⚠️ Removed deprecated [`GeckoRuntimeSettings.Builder.useMultiprocess`] and
|
|
||||||
[`GeckoRuntimeSettings.getUseMultiprocess`]. Single-process GeckoView is no
|
|
||||||
longer supported. ([bug 1650118]({{bugzilla}}1650118))
|
|
||||||
|
|
||||||
[83.1]: {{javadoc_uri}}/WebExtension.MetaData.html#temporary
|
[83.1]: {{javadoc_uri}}/WebExtension.MetaData.html#temporary
|
||||||
[83.2]: {{javadoc_uri}}/MediaSession.Delegate.html#onMetadata-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.MediaSession-org.mozilla.geckoview.MediaSession.Metadata-
|
[83.2]: {{javadoc_uri}}/MediaSession.Delegate.html#onMetadata-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.MediaSession-org.mozilla.geckoview.MediaSession.Metadata-
|
||||||
@ -74,7 +71,7 @@ exclude: true
|
|||||||
the thread and nullable annotation types.
|
the thread and nullable annotation types.
|
||||||
- Added [`REPLACED_TRACKING_CONTENT`][82.6] to content blocking API to indicate when unsafe content is shimmed.
|
- Added [`REPLACED_TRACKING_CONTENT`][82.6] to content blocking API to indicate when unsafe content is shimmed.
|
||||||
([bug 1663756]({{bugzilla}}1663756))
|
([bug 1663756]({{bugzilla}}1663756))
|
||||||
|
|
||||||
[82.1]: {{javadoc_uri}}/GeckoSession.ContentDelegate.html#onExternalResponse-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.GeckoSession.WebResponseInfo-
|
[82.1]: {{javadoc_uri}}/GeckoSession.ContentDelegate.html#onExternalResponse-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.GeckoSession.WebResponseInfo-
|
||||||
[82.2]: {{javadoc_uri}}/GeckoSession.ContentDelegate.html#onExternalResponse-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.GeckoResult-
|
[82.2]: {{javadoc_uri}}/GeckoSession.ContentDelegate.html#onExternalResponse-org.mozilla.geckoview.GeckoSession-org.mozilla.geckoview.GeckoResult-
|
||||||
[82.3]: {{javadoc_uri}}/Image.html
|
[82.3]: {{javadoc_uri}}/Image.html
|
||||||
@ -839,4 +836,4 @@ to allow adding gecko profiler markers.
|
|||||||
[65.24]: {{javadoc_uri}}/CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String-
|
[65.24]: {{javadoc_uri}}/CrashReporter.html#sendCrashReport-android.content.Context-android.os.Bundle-java.lang.String-
|
||||||
[65.25]: {{javadoc_uri}}/GeckoResult.html
|
[65.25]: {{javadoc_uri}}/GeckoResult.html
|
||||||
|
|
||||||
[api-version]: 8a6a2cd431b4185d3bc665c6ce13a84684dd7b9e
|
[api-version]: cd2ba68c049db26ce20ba332ef2ba46cbde4910a
|
||||||
|
@ -373,6 +373,7 @@ public class GeckoViewActivity
|
|||||||
WebExtensionDelegate,
|
WebExtensionDelegate,
|
||||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private static final String LOGTAG = "GeckoViewActivity";
|
private static final String LOGTAG = "GeckoViewActivity";
|
||||||
|
private static final String USE_MULTIPROCESS_EXTRA = "use_multiprocess";
|
||||||
private static final String FULL_ACCESSIBILITY_TREE_EXTRA = "full_accessibility_tree";
|
private static final String FULL_ACCESSIBILITY_TREE_EXTRA = "full_accessibility_tree";
|
||||||
private static final String SEARCH_URI_BASE = "https://www.google.com/search?q=";
|
private static final String SEARCH_URI_BASE = "https://www.google.com/search?q=";
|
||||||
private static final String ACTION_SHUTDOWN = "org.mozilla.geckoview_example.SHUTDOWN";
|
private static final String ACTION_SHUTDOWN = "org.mozilla.geckoview_example.SHUTDOWN";
|
||||||
@ -705,6 +706,8 @@ public class GeckoViewActivity
|
|||||||
ActionBar.LayoutParams.WRAP_CONTENT));
|
ActionBar.LayoutParams.WRAP_CONTENT));
|
||||||
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
||||||
|
|
||||||
|
final boolean useMultiprocess =
|
||||||
|
getIntent().getBooleanExtra(USE_MULTIPROCESS_EXTRA, true);
|
||||||
mFullAccessibilityTree = getIntent().getBooleanExtra(FULL_ACCESSIBILITY_TREE_EXTRA, false);
|
mFullAccessibilityTree = getIntent().getBooleanExtra(FULL_ACCESSIBILITY_TREE_EXTRA, false);
|
||||||
mProgressView = findViewById(R.id.page_progress);
|
mProgressView = findViewById(R.id.page_progress);
|
||||||
|
|
||||||
@ -723,6 +726,7 @@ public class GeckoViewActivity
|
|||||||
runtimeSettingsBuilder.extras(extras);
|
runtimeSettingsBuilder.extras(extras);
|
||||||
}
|
}
|
||||||
runtimeSettingsBuilder
|
runtimeSettingsBuilder
|
||||||
|
.useMultiprocess(useMultiprocess)
|
||||||
.remoteDebuggingEnabled(mRemoteDebugging.value())
|
.remoteDebuggingEnabled(mRemoteDebugging.value())
|
||||||
.consoleOutput(true)
|
.consoleOutput(true)
|
||||||
.contentBlocking(new ContentBlocking.Settings.Builder()
|
.contentBlocking(new ContentBlocking.Settings.Builder()
|
||||||
|
@ -931,6 +931,7 @@ class RunProgram(MachCommandBase):
|
|||||||
extras['env{}'.format(i)] = e
|
extras['env{}'.format(i)] = e
|
||||||
if args:
|
if args:
|
||||||
extras['args'] = " ".join(args)
|
extras['args'] = " ".join(args)
|
||||||
|
extras['use_multiprocess'] = True # Only GVE and TRA process this extra.
|
||||||
|
|
||||||
if env or args:
|
if env or args:
|
||||||
restart = True
|
restart = True
|
||||||
|
@ -1235,13 +1235,9 @@ def get_mobile_project(task):
|
|||||||
|
|
||||||
|
|
||||||
@transforms.add
|
@transforms.add
|
||||||
def adjust_mobile_e10s(config, tasks):
|
def disable_fennec_e10s(config, tasks):
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
project = get_mobile_project(task)
|
if get_mobile_project(task) == 'fennec':
|
||||||
if project == 'geckoview':
|
|
||||||
# Geckoview is always-e10s
|
|
||||||
task['e10s'] = True
|
|
||||||
elif project == 'fennec':
|
|
||||||
# Fennec is non-e10s
|
# Fennec is non-e10s
|
||||||
task['e10s'] = False
|
task['e10s'] = False
|
||||||
yield task
|
yield task
|
||||||
|
@ -155,6 +155,9 @@ class JUnitTestRunner(MochitestDesktop):
|
|||||||
cmd = "am instrument -w -r"
|
cmd = "am instrument -w -r"
|
||||||
# profile location
|
# profile location
|
||||||
cmd = cmd + " -e args '-profile %s'" % self.remote_profile
|
cmd = cmd + " -e args '-profile %s'" % self.remote_profile
|
||||||
|
# multi-process
|
||||||
|
e10s = 'true' if self.options.e10s else 'false'
|
||||||
|
cmd = cmd + " -e use_multiprocess %s" % e10s
|
||||||
# chunks (shards)
|
# chunks (shards)
|
||||||
shards = self.options.totalChunks
|
shards = self.options.totalChunks
|
||||||
shard = self.options.thisChunk
|
shard = self.options.thisChunk
|
||||||
@ -411,6 +414,11 @@ class JunitArgumentParser(argparse.ArgumentParser):
|
|||||||
dest="remoteTestRoot",
|
dest="remoteTestRoot",
|
||||||
help="Remote directory to use as test root "
|
help="Remote directory to use as test root "
|
||||||
"(eg. /data/local/tmp/test_root).")
|
"(eg. /data/local/tmp/test_root).")
|
||||||
|
self.add_argument("--disable-e10s",
|
||||||
|
action="store_false",
|
||||||
|
dest="e10s",
|
||||||
|
default=True,
|
||||||
|
help="Disable multiprocess mode in test app.")
|
||||||
self.add_argument("--max-time",
|
self.add_argument("--max-time",
|
||||||
action="store",
|
action="store",
|
||||||
type=int,
|
type=int,
|
||||||
|
@ -81,6 +81,13 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
|||||||
"default": "info",
|
"default": "info",
|
||||||
"help": "Set log level (debug|info|warning|error|critical|fatal)",
|
"help": "Set log level (debug|info|warning|error|critical|fatal)",
|
||||||
}
|
}
|
||||||
|
], [
|
||||||
|
['--disable-e10s', ],
|
||||||
|
{"action": "store_false",
|
||||||
|
"dest": "e10s",
|
||||||
|
"default": True,
|
||||||
|
"help": "Run tests without multiple processes (e10s).",
|
||||||
|
}
|
||||||
], [
|
], [
|
||||||
['--enable-webrender'],
|
['--enable-webrender'],
|
||||||
{"action": "store_true",
|
{"action": "store_true",
|
||||||
@ -143,6 +150,7 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
|||||||
self.device_serial = 'emulator-5554'
|
self.device_serial = 'emulator-5554'
|
||||||
self.log_raw_level = c.get('log_raw_level')
|
self.log_raw_level = c.get('log_raw_level')
|
||||||
self.log_tbpl_level = c.get('log_tbpl_level')
|
self.log_tbpl_level = c.get('log_tbpl_level')
|
||||||
|
self.e10s = c.get('e10s')
|
||||||
self.enable_webrender = c.get('enable_webrender')
|
self.enable_webrender = c.get('enable_webrender')
|
||||||
if self.enable_webrender:
|
if self.enable_webrender:
|
||||||
# AndroidMixin uses this when launching the emulator. We only want
|
# AndroidMixin uses this when launching the emulator. We only want
|
||||||
@ -263,6 +271,11 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
|||||||
category = 'reftest'
|
category = 'reftest'
|
||||||
else:
|
else:
|
||||||
category = self.test_suite
|
category = self.test_suite
|
||||||
|
if category not in SUITE_NO_E10S:
|
||||||
|
if category in SUITE_DEFAULT_E10S and not self.e10s:
|
||||||
|
cmd.extend(['--disable-e10s'])
|
||||||
|
elif category not in SUITE_DEFAULT_E10S and self.e10s:
|
||||||
|
cmd.extend(['--e10s'])
|
||||||
if c.get('repeat'):
|
if c.get('repeat'):
|
||||||
if category in SUITE_REPEATABLE:
|
if category in SUITE_REPEATABLE:
|
||||||
cmd.extend(["--repeat=%s" % c.get('repeat')])
|
cmd.extend(["--repeat=%s" % c.get('repeat')])
|
||||||
|
@ -71,6 +71,13 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||||||
"default": "info",
|
"default": "info",
|
||||||
"help": "Set log level (debug|info|warning|error|critical|fatal)",
|
"help": "Set log level (debug|info|warning|error|critical|fatal)",
|
||||||
}
|
}
|
||||||
|
], [
|
||||||
|
['--disable-e10s', ],
|
||||||
|
{"action": "store_false",
|
||||||
|
"dest": "e10s",
|
||||||
|
"default": True,
|
||||||
|
"help": "Run tests without multiple processes (e10s).",
|
||||||
|
}
|
||||||
], [
|
], [
|
||||||
['--enable-webrender'],
|
['--enable-webrender'],
|
||||||
{"action": "store_true",
|
{"action": "store_true",
|
||||||
@ -130,6 +137,7 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||||||
self.xre_path = None
|
self.xre_path = None
|
||||||
self.log_raw_level = c.get('log_raw_level')
|
self.log_raw_level = c.get('log_raw_level')
|
||||||
self.log_tbpl_level = c.get('log_tbpl_level')
|
self.log_tbpl_level = c.get('log_tbpl_level')
|
||||||
|
self.e10s = c.get('e10s')
|
||||||
self.enable_webrender = c.get('enable_webrender')
|
self.enable_webrender = c.get('enable_webrender')
|
||||||
self.extra_prefs = c.get('extra_prefs')
|
self.extra_prefs = c.get('extra_prefs')
|
||||||
|
|
||||||
@ -240,6 +248,11 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||||||
category = 'reftest'
|
category = 'reftest'
|
||||||
else:
|
else:
|
||||||
category = self.test_suite
|
category = self.test_suite
|
||||||
|
if category not in SUITE_NO_E10S:
|
||||||
|
if category in SUITE_DEFAULT_E10S and not self.e10s:
|
||||||
|
cmd.extend(['--disable-e10s'])
|
||||||
|
elif category not in SUITE_DEFAULT_E10S and self.e10s:
|
||||||
|
cmd.extend(['--e10s'])
|
||||||
if c.get('repeat'):
|
if c.get('repeat'):
|
||||||
if category in SUITE_REPEATABLE:
|
if category in SUITE_REPEATABLE:
|
||||||
cmd.extend(["--repeat=%s" % c.get('repeat')])
|
cmd.extend(["--repeat=%s" % c.get('repeat')])
|
||||||
|
@ -83,6 +83,8 @@ class WebExtensionAndroid(PerftestAndroid, WebExtension):
|
|||||||
"--profile",
|
"--profile",
|
||||||
self.remote_profile,
|
self.remote_profile,
|
||||||
"--allow-downgrade",
|
"--allow-downgrade",
|
||||||
|
"use_multiprocess",
|
||||||
|
self.config["e10s"],
|
||||||
],
|
],
|
||||||
env=dict(
|
env=dict(
|
||||||
LOG_VERBOSE=1,
|
LOG_VERBOSE=1,
|
||||||
|
@ -87,10 +87,10 @@ def env_options():
|
|||||||
|
|
||||||
|
|
||||||
class ProfileCreator(FirefoxProfileCreator):
|
class ProfileCreator(FirefoxProfileCreator):
|
||||||
def __init__(self, logger, prefs_root, config, test_type, extra_prefs,
|
def __init__(self, logger, prefs_root, config, test_type, extra_prefs, e10s,
|
||||||
enable_fission, browser_channel, certutil_binary, ca_certificate_path):
|
enable_fission, browser_channel, certutil_binary, ca_certificate_path):
|
||||||
super(ProfileCreator, self).__init__(logger, prefs_root, config, test_type, extra_prefs,
|
super(ProfileCreator, self).__init__(logger, prefs_root, config, test_type, extra_prefs,
|
||||||
True, enable_fission, browser_channel, None,
|
e10s, enable_fission, browser_channel, None,
|
||||||
certutil_binary, ca_certificate_path)
|
certutil_binary, ca_certificate_path)
|
||||||
|
|
||||||
def _set_required_prefs(self, profile):
|
def _set_required_prefs(self, profile):
|
||||||
@ -100,9 +100,11 @@ class ProfileCreator(FirefoxProfileCreator):
|
|||||||
"places.history.enabled": False,
|
"places.history.enabled": False,
|
||||||
"dom.send_after_paint_to_content": True,
|
"dom.send_after_paint_to_content": True,
|
||||||
"network.preload": True,
|
"network.preload": True,
|
||||||
"browser.tabs.remote.autostart": True,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if self.e10s:
|
||||||
|
profile.set_preferences({"browser.tabs.remote.autostart": True})
|
||||||
|
|
||||||
if self.test_type == "reftest":
|
if self.test_type == "reftest":
|
||||||
self.logger.info("Setting android reftest preferences")
|
self.logger.info("Setting android reftest preferences")
|
||||||
profile.set_preferences({
|
profile.set_preferences({
|
||||||
@ -140,7 +142,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||||||
self.stackwalk_binary = stackwalk_binary
|
self.stackwalk_binary = stackwalk_binary
|
||||||
self.certutil_binary = certutil_binary
|
self.certutil_binary = certutil_binary
|
||||||
self.ca_certificate_path = ca_certificate_path
|
self.ca_certificate_path = ca_certificate_path
|
||||||
self.e10s = True
|
self.e10s = e10s
|
||||||
self.enable_webrender = enable_webrender
|
self.enable_webrender = enable_webrender
|
||||||
self.stackfix_dir = stackfix_dir
|
self.stackfix_dir = stackfix_dir
|
||||||
self.binary_args = binary_args
|
self.binary_args = binary_args
|
||||||
@ -160,6 +162,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||||||
config,
|
config,
|
||||||
test_type,
|
test_type,
|
||||||
extra_prefs,
|
extra_prefs,
|
||||||
|
e10s,
|
||||||
False,
|
False,
|
||||||
browser_channel,
|
browser_channel,
|
||||||
certutil_binary,
|
certutil_binary,
|
||||||
|
@ -62,7 +62,7 @@ class GeckoViewSupport final
|
|||||||
jni::Object::Param aSessionAccessibility,
|
jni::Object::Param aSessionAccessibility,
|
||||||
jni::Object::Param aInitData, jni::String::Param aId,
|
jni::Object::Param aInitData, jni::String::Param aId,
|
||||||
jni::String::Param aChromeURI, int32_t aScreenId,
|
jni::String::Param aChromeURI, int32_t aScreenId,
|
||||||
bool aPrivateMode);
|
bool aPrivateMode, bool aRemote);
|
||||||
|
|
||||||
// Close and destroy the nsWindow.
|
// Close and destroy the nsWindow.
|
||||||
void Close();
|
void Close();
|
||||||
|
@ -1227,7 +1227,8 @@ void GeckoViewSupport::Open(
|
|||||||
jni::Object::Param aQueue, jni::Object::Param aCompositor,
|
jni::Object::Param aQueue, jni::Object::Param aCompositor,
|
||||||
jni::Object::Param aDispatcher, jni::Object::Param aSessionAccessibility,
|
jni::Object::Param aDispatcher, jni::Object::Param aSessionAccessibility,
|
||||||
jni::Object::Param aInitData, jni::String::Param aId,
|
jni::Object::Param aInitData, jni::String::Param aId,
|
||||||
jni::String::Param aChromeURI, int32_t aScreenId, bool aPrivateMode) {
|
jni::String::Param aChromeURI, int32_t aScreenId, bool aPrivateMode,
|
||||||
|
bool aRemote) {
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
AUTO_PROFILER_LABEL("mozilla::widget::GeckoViewSupport::Open", OTHER);
|
AUTO_PROFILER_LABEL("mozilla::widget::GeckoViewSupport::Open", OTHER);
|
||||||
@ -1251,10 +1252,13 @@ void GeckoViewSupport::Open(
|
|||||||
java::EventDispatcher::Ref::From(aDispatcher), nullptr);
|
java::EventDispatcher::Ref::From(aDispatcher), nullptr);
|
||||||
androidView->mInitData = java::GeckoBundle::Ref::From(aInitData);
|
androidView->mInitData = java::GeckoBundle::Ref::From(aInitData);
|
||||||
|
|
||||||
nsAutoCString chromeFlags("chrome,dialog=0,remote,resizable,scrollbars");
|
nsAutoCString chromeFlags("chrome,dialog=0,resizable,scrollbars");
|
||||||
if (aPrivateMode) {
|
if (aPrivateMode) {
|
||||||
chromeFlags += ",private";
|
chromeFlags += ",private";
|
||||||
}
|
}
|
||||||
|
if (aRemote) {
|
||||||
|
chromeFlags += ",remote";
|
||||||
|
}
|
||||||
nsCOMPtr<mozIDOMWindowProxy> domWindow;
|
nsCOMPtr<mozIDOMWindowProxy> domWindow;
|
||||||
ww->OpenWindow(nullptr, url, nsDependentCString(aId->ToCString().get()),
|
ww->OpenWindow(nullptr, url, nsDependentCString(aId->ToCString().get()),
|
||||||
chromeFlags, androidView, getter_AddRefs(domWindow));
|
chromeFlags, androidView, getter_AddRefs(domWindow));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user