Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
shindli 2018-06-04 01:07:15 +03:00
Родитель 7e765f798b 6a304d9349
Коммит 936dd8d764
16 изменённых файлов: 32 добавлений и 47 удалений

Просмотреть файл

@ -16,8 +16,8 @@ gyp_vars.update({
'build_with_mozilla': 1,
'build_with_chromium': 0,
# 10.9 once we move to TC cross-compiles - bug 1270217
'mac_sdk_min': '10.7',
'mac_deployment_target': '10.7',
'mac_sdk_min': '10.9',
'mac_deployment_target': '10.9',
'use_official_google_api_keys': 0,
'have_clock_monotonic': 1 if CONFIG['HAVE_CLOCK_MONOTONIC'] else 0,
'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,

Просмотреть файл

@ -144,7 +144,7 @@ include('android-ndk.configure', when=compiling_android)
# This needs to happen before any compilation test is done.
option('--enable-macos-target', env='MACOSX_DEPLOYMENT_TARGET', nargs=1,
default='10.7', help='Set the minimum MacOS version needed at runtime')
default='10.9', help='Set the minimum MacOS version needed at runtime')
@depends('--enable-macos-target', target)

Просмотреть файл

@ -534,7 +534,7 @@ uses-unsafe-cpows = true
skip-if = (e10s && debug) || (os == "mac" || (os == "linux" && bits == 64)) # bug 1373127 for frequent timeouts
[browser_dbg_variables-view-popup-10.js]
uses-unsafe-cpows = true
skip-if = e10s && debug
skip-if = (e10s && debug) || (os == "win" && !debug) # bug 1291027
[browser_dbg_variables-view-popup-11.js]
uses-unsafe-cpows = true
skip-if = e10s && debug

Просмотреть файл

@ -7617,7 +7617,8 @@ nsGlobalWindowInner::GetConsole(JSContext* aCx, ErrorResult& aRv)
bool
nsGlobalWindowInner::IsSecureContext() const
{
return JS_GetIsSecureContext(js::GetObjectCompartment(GetWrapperPreserveColor()));
JS::Realm* realm = js::GetNonCCWObjectRealm(GetWrapperPreserveColor());
return JS::GetIsSecureContext(realm);
}
already_AddRefed<External>

Просмотреть файл

@ -60,7 +60,9 @@ skip-if = os == 'mac' || os == 'win' || toolkit == 'android' # Bug 1404995, no l
[test_getUserMedia_basicVideo.html]
[test_getUserMedia_basicVideo_playAfterLoadedmetadata.html]
[test_getUserMedia_basicScreenshare.html]
skip-if = toolkit == 'android' # no screenshare on android
#skip-if = toolkit == 'android' # no screenshare on android
# When re-enabling this test, uncomment the line above.
disabled=bug 1405083
[test_getUserMedia_basicTabshare.html]
skip-if = toolkit == 'android' # no windowshare on android
[test_getUserMedia_basicWindowshare.html]

Просмотреть файл

@ -20,7 +20,7 @@ support-files =
file_redirect_handler.sjs
[test_main.html]
skip-if = toolkit == 'android' # Android: TIMED_OUT
skip-if = (toolkit == 'android') || webrender # Android: TIMED_OUT; bug 1402554
[test_bug803225.html]
skip-if = toolkit == 'android' || (os=='linux' && bits==32) || headless #Android: TIMED_OUT; Linux32:bug 1324870; Headless:bug 1405870
[test_frameNavigation.html]

Просмотреть файл

@ -2375,13 +2375,13 @@ RuntimeService::CreateSharedWorkerFromLoadInfo(JSContext* aCx,
created = true;
} else {
// Check whether the secure context state matches. The current compartment
// of aCx is the compartment of the SharedWorker constructor that was
// invoked, which is the compartment of the document that will be hooked up
// to the worker, so that's what we want to check.
// Check whether the secure context state matches. The current realm
// of aCx is the realm of the SharedWorker constructor that was invoked,
// which is the realm of the document that will be hooked up to the worker,
// so that's what we want to check.
shouldAttachToWorkerPrivate =
workerPrivate->IsSecureContext() ==
JS_GetIsSecureContext(js::GetContextCompartment(aCx));
JS::GetIsSecureContext(js::GetContextRealm(aCx));
// If we're attaching to an existing SharedWorker private, then we
// must update the overriden load group to account for our document's

Просмотреть файл

@ -191,7 +191,7 @@ bool
WorkerGlobalScope::IsSecureContext() const
{
bool globalSecure =
JS_GetIsSecureContext(js::GetObjectCompartment(GetWrapperPreserveColor()));
JS::GetIsSecureContext(js::GetNonCCWObjectRealm(GetWrapperPreserveColor()));
MOZ_ASSERT(globalSecure == mWorkerPrivate->IsSecureContext());
return globalSecure;
}

Просмотреть файл

@ -8,7 +8,7 @@
BEGIN_TEST(testBug795104)
{
JS::CompileOptions opts(cx);
JS::RealmBehaviorsRef(cx->compartment()).setDiscardSource(true);
JS::RealmBehaviorsRef(cx->realm()).setDiscardSource(true);
const size_t strLen = 60002;
char* s = static_cast<char*>(JS_malloc(cx, strLen));

Просмотреть файл

@ -1872,12 +1872,6 @@ JS::RealmCreationOptionsRef(JSCompartment* compartment)
return JS::GetRealmForCompartment(compartment)->creationOptions();
}
const JS::RealmCreationOptions&
JS::RealmCreationOptionsRef(JSObject* obj)
{
return obj->realm()->creationOptions();
}
const JS::RealmCreationOptions&
JS::RealmCreationOptionsRef(JSContext* cx)
{
@ -1904,15 +1898,9 @@ JS::RealmCreationOptions::setSharedMemoryAndAtomicsEnabled(bool flag)
}
JS::RealmBehaviors&
JS::RealmBehaviorsRef(JSCompartment* compartment)
JS::RealmBehaviorsRef(JS::Realm* realm)
{
return JS::GetRealmForCompartment(compartment)->behaviors();
}
JS::RealmBehaviors&
JS::RealmBehaviorsRef(JSObject* obj)
{
return obj->realm()->behaviors();
return realm->behaviors();
}
JS::RealmBehaviors&

Просмотреть файл

@ -1957,17 +1957,11 @@ class JS_PUBLIC_API(RealmOptions)
JS_PUBLIC_API(const RealmCreationOptions&)
RealmCreationOptionsRef(JSCompartment* compartment);
JS_PUBLIC_API(const RealmCreationOptions&)
RealmCreationOptionsRef(JSObject* obj);
JS_PUBLIC_API(const RealmCreationOptions&)
RealmCreationOptionsRef(JSContext* cx);
JS_PUBLIC_API(RealmBehaviors&)
RealmBehaviorsRef(JSCompartment* compartment);
JS_PUBLIC_API(RealmBehaviors&)
RealmBehaviorsRef(JSObject* obj);
RealmBehaviorsRef(JS::Realm* realm);
JS_PUBLIC_API(RealmBehaviors&)
RealmBehaviorsRef(JSContext* cx);

Просмотреть файл

@ -1312,7 +1312,7 @@ static ClippedTime
NowAsMillis(JSContext* cx)
{
double now = PRMJ_Now();
bool clampAndJitter = JS::RealmCreationOptionsRef(js::GetContextCompartment(cx)).clampAndJitterTime();
bool clampAndJitter = cx->realm()->creationOptions().clampAndJitterTime();
if (clampAndJitter && sReduceMicrosecondTimePrecisionCallback)
now = sReduceMicrosecondTimePrecisionCallback(now);
else if (clampAndJitter && sResolutionUsec) {

Просмотреть файл

@ -149,9 +149,9 @@ JS_NewObjectWithoutMetadata(JSContext* cx, const JSClass* clasp, JS::Handle<JSOb
}
JS_FRIEND_API(bool)
JS_GetIsSecureContext(JSCompartment* compartment)
JS::GetIsSecureContext(JS::Realm* realm)
{
return JS::GetRealmForCompartment(compartment)->creationOptions().secureContext();
return realm->creationOptions().secureContext();
}
JS_FRIEND_API(JSPrincipals*)

Просмотреть файл

@ -184,9 +184,6 @@ typedef void
extern JS_FRIEND_API(void)
JS_SetSetUseCounterCallback(JSContext* cx, JSSetUseCounterCallback callback);
extern JS_FRIEND_API(bool)
JS_GetIsSecureContext(JSCompartment* compartment);
extern JS_FRIEND_API(JSPrincipals*)
JS_GetCompartmentPrincipals(JSCompartment* compartment);
@ -328,6 +325,9 @@ GetRealmPrincipals(JS::Realm* realm);
extern JS_FRIEND_API(void)
SetRealmPrincipals(JS::Realm* realm, JSPrincipals* principals);
extern JS_FRIEND_API(bool)
GetIsSecureContext(JS::Realm* realm);
} // namespace JS
/**

Просмотреть файл

@ -1332,15 +1332,15 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
return 1;
}
// Even if we're building in a configuration where source is
// discarded, there's no reason to do that on XPCShell, and doing so
// might break various automation scripts.
JS::RealmBehaviorsRef(glob).setDiscardSource(false);
backstagePass->SetGlobalObject(glob);
JSAutoRealm ar(cx, glob);
// Even if we're building in a configuration where source is
// discarded, there's no reason to do that on XPCShell, and doing so
// might break various automation scripts.
JS::RealmBehaviorsRef(cx).setDiscardSource(false);
if (!JS_InitReflectParse(cx, glob)) {
return 1;
}

Просмотреть файл

@ -2380,7 +2380,7 @@ if test -n "$MOZ_APPLEMEDIA"; then
LDFLAGS="$LDFLAGS -framework AudioToolbox"
dnl Verify CoreMedia is available.
AC_CHECK_HEADER([CoreMedia/CoreMedia.h], [],
[AC_MSG_ERROR([MacOS X 10.7 SDK or later is required])])
[AC_MSG_ERROR([MacOS X 10.9 SDK or later is required])])
fi
fi # COMPILE_ENVIRONMENT