зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4ad583397b
Коммит
5e0d52e2cc
|
@ -632,6 +632,7 @@ package org.mozilla.geckoview {
|
|||
method @Nullable public Rect getScreenSizeOverride();
|
||||
method @Nullable public RuntimeTelemetry.Delegate getTelemetryDelegate();
|
||||
method public boolean getUseMaxScreenDepth();
|
||||
method @Deprecated public boolean getUseMultiprocess();
|
||||
method public boolean getWebFontsEnabled();
|
||||
method public boolean getWebManifestEnabled();
|
||||
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 telemetryDelegate(@NonNull RuntimeTelemetry.Delegate);
|
||||
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 webManifest(boolean);
|
||||
method @NonNull protected GeckoRuntimeSettings newSettings(@Nullable GeckoRuntimeSettings);
|
||||
|
|
|
@ -31,6 +31,7 @@ class ContentCrashTest : BaseSessionTest() {
|
|||
@IgnoreCrash
|
||||
@Test
|
||||
fun crashContent() {
|
||||
assumeTrue(sessionRule.env.isMultiprocess)
|
||||
// We need the crash reporter for this test
|
||||
assumeTrue(BuildConfig.MOZ_CRASHREPORTER)
|
||||
|
||||
|
|
|
@ -119,6 +119,9 @@ class ContentDelegateMultipleSessionsTest : BaseSessionTest() {
|
|||
|
||||
@IgnoreCrash
|
||||
@Test fun crashContentMultipleSessions() {
|
||||
// This test doesn't make sense without multiprocess
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
|
||||
val newSession = getSecondGeckoSession()
|
||||
|
||||
// We can inadvertently catch the `onCrash` call for the cached session if we don't specify
|
||||
|
@ -158,6 +161,8 @@ class ContentDelegateMultipleSessionsTest : BaseSessionTest() {
|
|||
|
||||
@IgnoreCrash
|
||||
@Test fun killContentMultipleSessions() {
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
|
||||
val newSession = getSecondGeckoSession()
|
||||
|
||||
val mainSessionKilled = GeckoResult<Void>()
|
||||
|
|
|
@ -111,6 +111,9 @@ class ContentDelegateTest : BaseSessionTest() {
|
|||
|
||||
@IgnoreCrash
|
||||
@Test fun crashContent() {
|
||||
// This test doesn't make sense without multiprocess
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
|
||||
mainSession.loadUri(CONTENT_CRASH_URL)
|
||||
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
||||
@AssertCalled(count = 1)
|
||||
|
@ -134,6 +137,9 @@ class ContentDelegateTest : BaseSessionTest() {
|
|||
@IgnoreCrash
|
||||
@WithDisplay(width = 10, height = 10)
|
||||
@Test fun crashContent_tapAfterCrash() {
|
||||
// This test doesn't make sense without multiprocess
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
|
||||
mainSession.delegateUntilTestEnd(object : Callbacks.ContentDelegate {
|
||||
override fun onCrash(session: GeckoSession) {
|
||||
mainSession.open()
|
||||
|
@ -164,6 +170,8 @@ class ContentDelegateTest : BaseSessionTest() {
|
|||
|
||||
@IgnoreCrash
|
||||
@Test fun killContent() {
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
|
||||
killAllContentProcesses()
|
||||
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
||||
@AssertCalled(count = 1)
|
||||
|
|
|
@ -1637,6 +1637,8 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
|
|||
|
||||
@IgnoreCrash
|
||||
@Test fun contentCrashIgnored() {
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
|
||||
mainSession.loadUri(CONTENT_CRASH_URL)
|
||||
mainSession.waitUntilCalled(object : Callbacks.ContentDelegate {
|
||||
@AssertCalled(count = 1)
|
||||
|
@ -1646,6 +1648,7 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) {
|
|||
|
||||
@Test(expected = ChildCrashedException::class)
|
||||
fun contentCrashFails() {
|
||||
assumeThat(sessionRule.env.isMultiprocess, equalTo(true))
|
||||
assumeThat(sessionRule.env.shouldShutdownOnCrash(), equalTo(false))
|
||||
|
||||
sessionRule.session.loadUri(CONTENT_CRASH_URL)
|
||||
|
|
|
@ -38,6 +38,12 @@ public class Environment {
|
|||
return !getEnvVar("MOZ_CRASHREPORTER_SHUTDOWN").isEmpty();
|
||||
}
|
||||
|
||||
public boolean isMultiprocess() {
|
||||
return Boolean.valueOf(InstrumentationRegistry.getArguments()
|
||||
.getString("use_multiprocess",
|
||||
"true"));
|
||||
}
|
||||
|
||||
public boolean isDebugging() {
|
||||
return Debug.isDebuggerConnected();
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ public class RuntimeCreator {
|
|||
.build();
|
||||
|
||||
final GeckoRuntimeSettings runtimeSettings = new GeckoRuntimeSettings.Builder()
|
||||
.useMultiprocess(env.isMultiprocess())
|
||||
.contentBlocking(new ContentBlocking.Settings.Builder()
|
||||
.safeBrowsingProviders(googleLegacy, google)
|
||||
.build())
|
||||
|
|
|
@ -294,7 +294,10 @@ public final class GeckoRuntime implements Parcelable {
|
|||
if (DEBUG) {
|
||||
Log.d(LOGTAG, "init");
|
||||
}
|
||||
int flags = GeckoThread.FLAG_PRELOAD_CHILD;
|
||||
int flags = 0;
|
||||
if (settings.getUseMultiprocess()) {
|
||||
flags |= GeckoThread.FLAG_PRELOAD_CHILD;
|
||||
}
|
||||
|
||||
if (settings.getPauseForDebuggerEnabled()) {
|
||||
flags |= GeckoThread.FLAG_DEBUGGING;
|
||||
|
|
|
@ -45,6 +45,22 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
|
|||
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.
|
||||
*
|
||||
|
@ -487,6 +503,8 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
|
|||
"general.aboutConfig.enable", false);
|
||||
/* package */ final Pref<Boolean> mForceUserScalable = new Pref<>(
|
||||
"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>(
|
||||
"signon.autofillForms", true);
|
||||
|
||||
|
@ -559,6 +577,20 @@ public final class GeckoRuntimeSettings extends RuntimeSettings {
|
|||
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.
|
||||
*
|
||||
|
|
|
@ -1031,7 +1031,7 @@ public class GeckoSession {
|
|||
Compositor compositor, EventDispatcher dispatcher,
|
||||
SessionAccessibility.NativeProvider sessionAccessibility,
|
||||
GeckoBundle initData, String id, String chromeUri,
|
||||
int screenId, boolean privateMode);
|
||||
int screenId, boolean privateMode, boolean isRemote);
|
||||
|
||||
@Override // JNIObject
|
||||
public void disposeNative() {
|
||||
|
@ -1301,6 +1301,7 @@ public class GeckoSession {
|
|||
final String chromeUri = mSettings.getChromeUri();
|
||||
final int screenId = mSettings.getScreenId();
|
||||
final boolean isPrivate = mSettings.getUsePrivateMode();
|
||||
final boolean isRemote = runtime.getSettings().getUseMultiprocess();
|
||||
|
||||
mWindow = new Window(runtime, this, mNativeQueue);
|
||||
mWebExtensionController.setRuntime(runtime);
|
||||
|
@ -1310,7 +1311,7 @@ public class GeckoSession {
|
|||
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {
|
||||
Window.open(mWindow, mNativeQueue, mCompositor, mEventDispatcher,
|
||||
mAccessibility != null ? mAccessibility.nativeProvider : null,
|
||||
createInitData(), mId, chromeUri, screenId, isPrivate);
|
||||
createInitData(), mId, chromeUri, screenId, isPrivate, isRemote);
|
||||
} else {
|
||||
GeckoThread.queueNativeCallUntil(
|
||||
GeckoThread.State.PROFILE_READY,
|
||||
|
@ -1324,7 +1325,7 @@ public class GeckoSession {
|
|||
GeckoBundle.class, createInitData(),
|
||||
String.class, mId,
|
||||
String.class, chromeUri,
|
||||
screenId, isPrivate);
|
||||
screenId, isPrivate, isRemote);
|
||||
}
|
||||
|
||||
onWindowChanged(WINDOW_OPEN, /* inProgress */ false);
|
||||
|
|
|
@ -37,9 +37,6 @@ exclude: true
|
|||
- Added [`Loader#headerFilter`][83.9] to override the default header filtering
|
||||
behavior.
|
||||
([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.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.
|
||||
- Added [`REPLACED_TRACKING_CONTENT`][82.6] to content blocking API to indicate when unsafe content is shimmed.
|
||||
([bug 1663756]({{bugzilla}}1663756))
|
||||
|
||||
|
||||
[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.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.25]: {{javadoc_uri}}/GeckoResult.html
|
||||
|
||||
[api-version]: 8a6a2cd431b4185d3bc665c6ce13a84684dd7b9e
|
||||
[api-version]: cd2ba68c049db26ce20ba332ef2ba46cbde4910a
|
||||
|
|
|
@ -373,6 +373,7 @@ public class GeckoViewActivity
|
|||
WebExtensionDelegate,
|
||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
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 SEARCH_URI_BASE = "https://www.google.com/search?q=";
|
||||
private static final String ACTION_SHUTDOWN = "org.mozilla.geckoview_example.SHUTDOWN";
|
||||
|
@ -705,6 +706,8 @@ public class GeckoViewActivity
|
|||
ActionBar.LayoutParams.WRAP_CONTENT));
|
||||
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
|
||||
|
||||
final boolean useMultiprocess =
|
||||
getIntent().getBooleanExtra(USE_MULTIPROCESS_EXTRA, true);
|
||||
mFullAccessibilityTree = getIntent().getBooleanExtra(FULL_ACCESSIBILITY_TREE_EXTRA, false);
|
||||
mProgressView = findViewById(R.id.page_progress);
|
||||
|
||||
|
@ -723,6 +726,7 @@ public class GeckoViewActivity
|
|||
runtimeSettingsBuilder.extras(extras);
|
||||
}
|
||||
runtimeSettingsBuilder
|
||||
.useMultiprocess(useMultiprocess)
|
||||
.remoteDebuggingEnabled(mRemoteDebugging.value())
|
||||
.consoleOutput(true)
|
||||
.contentBlocking(new ContentBlocking.Settings.Builder()
|
||||
|
|
|
@ -931,6 +931,7 @@ class RunProgram(MachCommandBase):
|
|||
extras['env{}'.format(i)] = e
|
||||
if args:
|
||||
extras['args'] = " ".join(args)
|
||||
extras['use_multiprocess'] = True # Only GVE and TRA process this extra.
|
||||
|
||||
if env or args:
|
||||
restart = True
|
||||
|
|
|
@ -1235,13 +1235,9 @@ def get_mobile_project(task):
|
|||
|
||||
|
||||
@transforms.add
|
||||
def adjust_mobile_e10s(config, tasks):
|
||||
def disable_fennec_e10s(config, tasks):
|
||||
for task in tasks:
|
||||
project = get_mobile_project(task)
|
||||
if project == 'geckoview':
|
||||
# Geckoview is always-e10s
|
||||
task['e10s'] = True
|
||||
elif project == 'fennec':
|
||||
if get_mobile_project(task) == 'fennec':
|
||||
# Fennec is non-e10s
|
||||
task['e10s'] = False
|
||||
yield task
|
||||
|
|
|
@ -155,6 +155,9 @@ class JUnitTestRunner(MochitestDesktop):
|
|||
cmd = "am instrument -w -r"
|
||||
# profile location
|
||||
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)
|
||||
shards = self.options.totalChunks
|
||||
shard = self.options.thisChunk
|
||||
|
@ -411,6 +414,11 @@ class JunitArgumentParser(argparse.ArgumentParser):
|
|||
dest="remoteTestRoot",
|
||||
help="Remote directory to use as 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",
|
||||
action="store",
|
||||
type=int,
|
||||
|
|
|
@ -81,6 +81,13 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
|||
"default": "info",
|
||||
"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'],
|
||||
{"action": "store_true",
|
||||
|
@ -143,6 +150,7 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
|||
self.device_serial = 'emulator-5554'
|
||||
self.log_raw_level = c.get('log_raw_level')
|
||||
self.log_tbpl_level = c.get('log_tbpl_level')
|
||||
self.e10s = c.get('e10s')
|
||||
self.enable_webrender = c.get('enable_webrender')
|
||||
if self.enable_webrender:
|
||||
# AndroidMixin uses this when launching the emulator. We only want
|
||||
|
@ -263,6 +271,11 @@ class AndroidEmulatorTest(TestingMixin, BaseScript, MozbaseMixin, CodeCoverageMi
|
|||
category = 'reftest'
|
||||
else:
|
||||
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 category in SUITE_REPEATABLE:
|
||||
cmd.extend(["--repeat=%s" % c.get('repeat')])
|
||||
|
|
|
@ -71,6 +71,13 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||
"default": "info",
|
||||
"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'],
|
||||
{"action": "store_true",
|
||||
|
@ -130,6 +137,7 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||
self.xre_path = None
|
||||
self.log_raw_level = c.get('log_raw_level')
|
||||
self.log_tbpl_level = c.get('log_tbpl_level')
|
||||
self.e10s = c.get('e10s')
|
||||
self.enable_webrender = c.get('enable_webrender')
|
||||
self.extra_prefs = c.get('extra_prefs')
|
||||
|
||||
|
@ -240,6 +248,11 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||
category = 'reftest'
|
||||
else:
|
||||
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 category in SUITE_REPEATABLE:
|
||||
cmd.extend(["--repeat=%s" % c.get('repeat')])
|
||||
|
|
|
@ -83,6 +83,8 @@ class WebExtensionAndroid(PerftestAndroid, WebExtension):
|
|||
"--profile",
|
||||
self.remote_profile,
|
||||
"--allow-downgrade",
|
||||
"use_multiprocess",
|
||||
self.config["e10s"],
|
||||
],
|
||||
env=dict(
|
||||
LOG_VERBOSE=1,
|
||||
|
|
|
@ -87,10 +87,10 @@ def env_options():
|
|||
|
||||
|
||||
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):
|
||||
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)
|
||||
|
||||
def _set_required_prefs(self, profile):
|
||||
|
@ -100,9 +100,11 @@ class ProfileCreator(FirefoxProfileCreator):
|
|||
"places.history.enabled": False,
|
||||
"dom.send_after_paint_to_content": 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":
|
||||
self.logger.info("Setting android reftest preferences")
|
||||
profile.set_preferences({
|
||||
|
@ -140,7 +142,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||
self.stackwalk_binary = stackwalk_binary
|
||||
self.certutil_binary = certutil_binary
|
||||
self.ca_certificate_path = ca_certificate_path
|
||||
self.e10s = True
|
||||
self.e10s = e10s
|
||||
self.enable_webrender = enable_webrender
|
||||
self.stackfix_dir = stackfix_dir
|
||||
self.binary_args = binary_args
|
||||
|
@ -160,6 +162,7 @@ class FirefoxAndroidBrowser(Browser):
|
|||
config,
|
||||
test_type,
|
||||
extra_prefs,
|
||||
e10s,
|
||||
False,
|
||||
browser_channel,
|
||||
certutil_binary,
|
||||
|
|
|
@ -62,7 +62,7 @@ class GeckoViewSupport final
|
|||
jni::Object::Param aSessionAccessibility,
|
||||
jni::Object::Param aInitData, jni::String::Param aId,
|
||||
jni::String::Param aChromeURI, int32_t aScreenId,
|
||||
bool aPrivateMode);
|
||||
bool aPrivateMode, bool aRemote);
|
||||
|
||||
// Close and destroy the nsWindow.
|
||||
void Close();
|
||||
|
|
|
@ -1227,7 +1227,8 @@ void GeckoViewSupport::Open(
|
|||
jni::Object::Param aQueue, jni::Object::Param aCompositor,
|
||||
jni::Object::Param aDispatcher, jni::Object::Param aSessionAccessibility,
|
||||
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());
|
||||
|
||||
AUTO_PROFILER_LABEL("mozilla::widget::GeckoViewSupport::Open", OTHER);
|
||||
|
@ -1251,10 +1252,13 @@ void GeckoViewSupport::Open(
|
|||
java::EventDispatcher::Ref::From(aDispatcher), nullptr);
|
||||
androidView->mInitData = java::GeckoBundle::Ref::From(aInitData);
|
||||
|
||||
nsAutoCString chromeFlags("chrome,dialog=0,remote,resizable,scrollbars");
|
||||
nsAutoCString chromeFlags("chrome,dialog=0,resizable,scrollbars");
|
||||
if (aPrivateMode) {
|
||||
chromeFlags += ",private";
|
||||
}
|
||||
if (aRemote) {
|
||||
chromeFlags += ",remote";
|
||||
}
|
||||
nsCOMPtr<mozIDOMWindowProxy> domWindow;
|
||||
ww->OpenWindow(nullptr, url, nsDependentCString(aId->ToCString().get()),
|
||||
chromeFlags, androidView, getter_AddRefs(domWindow));
|
||||
|
|
Загрузка…
Ссылка в новой задаче