mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 13:43:44 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1193227 - Exclude tests from Mac B2G / Mulet packages. r=spohl (bc6219e278) - Bug 1224000 - Install defaults/permissions file under browser/ instead of under browser/chrome/browser. r=mshal,r=MattN (9502588a4f) - Bug 1244999 - Move icon-related DEFINES to moz.build in browser/app. r=mshal (b50bd16362) - bits of Bug 1077148 part 4 (a0ee9d1e43) - Bug 1264162 - Move branding installation to branding-common.mozbuild; r=glandium (96153e2196) - align configures a little (69326315ba) - Bug 1082983 - Enable the Windows console in ASAN builds; r=glandium (3839846239) - Bug 1266875 - Remove custom install rules; r=chmanchester (91f673ee9f) - remove allow warnings (3891acce36) - Bug 1266129 - Upgrade ffvpx to 3.0.2. . r=ajones (fcbb57fdc5) - Bug 1268138 - Call StringSplitString directly for internal use. r=till (1edf155d43) - Bug 1268034 - Part 1: Reset constructor slot of GlobalObject to undefined when it fails to initialize constructor. r=till (1eaebb838b) - Bug 1268034 - Part 2: Call setConstructor and initBuiltinConstructor after defining properties in all init function. r=till (fcf42ec3b7) - bug 1139012 - telemetry for MLS vs win8 geolocation response. r=cpetrson (26745928e7) - Bug 1253159 - Remove locationUpdatePending and restore request timeout. r=jdm (e37e1d992d) - Bug 1250709 - Upgrade browser to gcc 4.9.3, r=glandium (2dc1262978) - Bug 1250709 - Clobber builds, r=terrence (e56a27abcc) - CSE some multiply-repeated ToFloatRegister(...) and such in some of the JIT backends into local variables for readability. No bug, r=bbouvier (7ee653c3c8) - Bug 1266180 - Port unboxed object getprop stub to CacheIR. r=efaust (104e6aabae) - Bug 1266695 - Port typed object getprop stub to CacheIR. r=efaust (3b627b5bd6) - Bug 1263811 - Do not attach optimized IC for arguments element access if any arguments element has been overridden. r=jandem (7ffb405dd1) - Bug 1266434 - Make Debugger::findScripts delazify scipts in a separate phase now this can GC r=jimb a=abuillings (b08013336e) - Bug 1204170 - Fix icns file for b2g graphene builds. r=spohl (e43e2e9d4f) - Bug 1201672 - Package more files for B2G desktop on OS X. r=spohl (e6cb92bd0d) - Bug 1268863 - Follow-up to appease rooting hazard analysis (rs=sfink) (4f6aaafe27) - Bug 1266649: TraceLogger - Handle failing to add to pointermap gracefully, r=bbouvier (12c006b2ed) - Bug 1268740 - Change AllocateArrayBuffer to receive byteLength with |count * unit| format. r=lth (5f435125bc) - Bug 1267755 - Print objects' class names in JS::ubi::dumpPaths; r=jimb (bace99e63d) - Bug 1267737 - Request edge names from JS::ubi::RootList before calling `init`; r=jimb (1b858d7a0c) - Bug 1266639 - Don't separately heap-allocate PLDHashTables within XPCMaps. r=mrbkap. (17bc8c82cc) - Bug 1263205 - BaldrMonkey: add temporary Wasm.experimentalVersion (r=bbouvier) (f71b47386e) - Bug 1219098 - Odin: Share JSFunction objects to make less garbage (r=bbouvier) (f602609a78)
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"version": "gcc 4.9.3",
|
||||
"size": 102421980,
|
||||
"digest": "f25292aa93dc449e0472eee511c0ac15b5f1a4272ab76cf53ce5d20dc57f29e83da49ae1a9d9e994192647f75e13ae60f75ba2ac3cb9d26d5f5d6cabf88de921",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gcc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"hg_id" : "ec7b7d2442e8",
|
||||
"algorithm" : "sha512",
|
||||
"digest" : "49627d734df52cb9e7319733da5a6be1812b9373355dc300ee5600b431122570e00d380d50c7c5b5003c462c2c2cb022494b42c4ad00f8eba01c2259cbe6e502",
|
||||
"filename" : "sixgill.tar.xz",
|
||||
"size" : 2628868,
|
||||
"unpack" : true
|
||||
},
|
||||
{
|
||||
"size": 12072532,
|
||||
"digest": "3915f8ec396c56a8a92e6f9695b70f09ce9d1582359d1258e37e3fd43a143bc974410e4cfc27f500e095f34a8956206e0ebf799b7287f0f38def0d5e34ed71c9",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 89319524,
|
||||
"digest": "5383d843c9f28abf0a6d254e9d975d96972d2c86d627ca836fa8e272a5d53230603b387d7d1499c49df7f84b1bb946946e800a85c88d968bdbe81c755fcb02e1",
|
||||
"algorithm": "sha512",
|
||||
"filename": "rustc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 167175,
|
||||
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
|
||||
"algorithm": "sha512",
|
||||
"filename": "sccache.tar.bz2",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 31078810,
|
||||
"digest": "2dffe4e5419a0c0c9908dc52b01cc07379a42e2aa8481be7a26bb8750b586b95bbac3fe57e64f5d37b43e206516ea70ad938a2e45858fdcf1e28258e70ae8d8c",
|
||||
"algorithm": "sha512",
|
||||
"filename": "moz-tt.tar.bz2",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
||||
@@ -82,6 +82,13 @@ endif
|
||||
DEFINES += -DBINPATH=$(BINPATH)
|
||||
DEFINES += -DRESPATH=$(RESPATH)
|
||||
|
||||
LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
ifeq (zh-TW,$(AB_CD))
|
||||
LPROJ_ROOT := $(subst -,_,$(AB_CD))
|
||||
endif
|
||||
endif
|
||||
DEFINES += -DLPROJ_ROOT=$(LPROJ_ROOT)
|
||||
|
||||
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
|
||||
DEFINES += -DMOZ_SHARED_MOZGLUE=1
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
@APPNAME@/Contents/Info.plist
|
||||
@APPNAME@/Contents/PkgInfo
|
||||
@APPNAME@/Contents/Plug-Ins/
|
||||
@RESPATH@
|
||||
@RESPATH@/@MOZ_APP_NAME@.icns
|
||||
@RESPATH@/@LPROJ_ROOT@.lproj/*
|
||||
#endif
|
||||
|
||||
[@AB_CD@]
|
||||
@@ -42,9 +43,7 @@
|
||||
#endif
|
||||
|
||||
[xpcom]
|
||||
#ifndef XP_MACOSX
|
||||
@RESPATH@/dependentlibs.list
|
||||
#endif
|
||||
#ifdef GKMEDIAS_SHARED_LIBRARY
|
||||
@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@
|
||||
#endif
|
||||
@@ -136,7 +135,7 @@
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MOZ_WEBSPEECH_MODELS
|
||||
@BINPATH@/models/
|
||||
@RESPATH@/models/
|
||||
#endif
|
||||
|
||||
; [Components]
|
||||
@@ -148,35 +147,35 @@
|
||||
#endif
|
||||
@RESPATH@/components/accessibility.xpt
|
||||
#endif
|
||||
@BINPATH@/components/appshell.xpt
|
||||
@BINPATH@/components/appstartup.xpt
|
||||
@BINPATH@/components/autocomplete.xpt
|
||||
@BINPATH@/components/autoconfig.xpt
|
||||
@BINPATH@/components/browsercompsbase.xpt
|
||||
@BINPATH@/components/browser-element.xpt
|
||||
@BINPATH@/components/browser-feeds.xpt
|
||||
@BINPATH@/components/caps.xpt
|
||||
@BINPATH@/components/chardet.xpt
|
||||
@BINPATH@/components/chrome.xpt
|
||||
@BINPATH@/components/commandhandler.xpt
|
||||
@BINPATH@/components/commandlines.xpt
|
||||
@BINPATH@/components/compartments.xpt
|
||||
@BINPATH@/components/composer.xpt
|
||||
@BINPATH@/components/content_events.xpt
|
||||
@BINPATH@/components/content_html.xpt
|
||||
@BINPATH@/components/content_xslt.xpt
|
||||
@BINPATH@/components/cookie.xpt
|
||||
@BINPATH@/components/devtools_security.xpt
|
||||
@BINPATH@/components/directory.xpt
|
||||
@BINPATH@/components/diskspacewatcher.xpt
|
||||
@BINPATH@/components/docshell.xpt
|
||||
@BINPATH@/components/dom.xpt
|
||||
@BINPATH@/components/dom_activities.xpt
|
||||
@BINPATH@/components/dom_apps.xpt
|
||||
@BINPATH@/components/dom_newapps.xpt
|
||||
@BINPATH@/components/dom_audiochannel.xpt
|
||||
@BINPATH@/components/dom_base.xpt
|
||||
@BINPATH@/components/dom_system.xpt
|
||||
@RESPATH@/components/appshell.xpt
|
||||
@RESPATH@/components/appstartup.xpt
|
||||
@RESPATH@/components/autocomplete.xpt
|
||||
@RESPATH@/components/autoconfig.xpt
|
||||
@RESPATH@/components/browsercompsbase.xpt
|
||||
@RESPATH@/components/browser-element.xpt
|
||||
@RESPATH@/components/browser-feeds.xpt
|
||||
@RESPATH@/components/caps.xpt
|
||||
@RESPATH@/components/chardet.xpt
|
||||
@RESPATH@/components/chrome.xpt
|
||||
@RESPATH@/components/commandhandler.xpt
|
||||
@RESPATH@/components/commandlines.xpt
|
||||
@RESPATH@/components/compartments.xpt
|
||||
@RESPATH@/components/composer.xpt
|
||||
@RESPATH@/components/content_events.xpt
|
||||
@RESPATH@/components/content_html.xpt
|
||||
@RESPATH@/components/content_xslt.xpt
|
||||
@RESPATH@/components/cookie.xpt
|
||||
@RESPATH@/components/devtools_security.xpt
|
||||
@RESPATH@/components/directory.xpt
|
||||
@RESPATH@/components/diskspacewatcher.xpt
|
||||
@RESPATH@/components/docshell.xpt
|
||||
@RESPATH@/components/dom.xpt
|
||||
@RESPATH@/components/dom_activities.xpt
|
||||
@RESPATH@/components/dom_apps.xpt
|
||||
@RESPATH@/components/dom_newapps.xpt
|
||||
@RESPATH@/components/dom_audiochannel.xpt
|
||||
@RESPATH@/components/dom_base.xpt
|
||||
@RESPATH@/components/dom_system.xpt
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
@RESPATH@/components/dom_wifi.xpt
|
||||
@RESPATH@/components/dom_system_gonk.xpt
|
||||
@@ -189,7 +188,7 @@
|
||||
@RESPATH@/components/dom_bluetooth.xpt
|
||||
#endif
|
||||
#ifdef MOZ_B2G_CAMERA
|
||||
@BINPATH@/components/dom_camera.xpt
|
||||
@RESPATH@/components/dom_camera.xpt
|
||||
#endif
|
||||
@RESPATH@/components/dom_canvas.xpt
|
||||
@RESPATH@/components/dom_contacts.xpt
|
||||
@@ -488,8 +487,8 @@
|
||||
|
||||
; Camera
|
||||
#ifdef MOZ_B2G_CAMERA
|
||||
@BINPATH@/components/CameraTestHardware.js
|
||||
@BINPATH@/components/CameraTestHardware.manifest
|
||||
@RESPATH@/components/CameraTestHardware.js
|
||||
@RESPATH@/components/CameraTestHardware.manifest
|
||||
#endif // MOZ_B2G_CAMERA
|
||||
|
||||
; Tethering
|
||||
|
||||
+1
-11
@@ -7,20 +7,10 @@ dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME)
|
||||
# hardcode en-US for the moment
|
||||
AB_CD = en-US
|
||||
|
||||
DEFINES += \
|
||||
-DAB_CD=$(AB_CD) \
|
||||
-DAPP_VERSION="$(MOZ_APP_VERSION)" \
|
||||
-DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" \
|
||||
-DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" \
|
||||
-DNEWWINDOW_ICO=\"$(DIST)/branding/newwindow.ico\" \
|
||||
-DNEWTAB_ICO=\"$(DIST)/branding/newtab.ico\" \
|
||||
-DPBMODE_ICO=\"$(DIST)/branding/pbmode.ico\" \
|
||||
$(NULL)
|
||||
|
||||
# Build a binary bootstrapping with XRE_main
|
||||
|
||||
ifndef MOZ_WINCONSOLE
|
||||
ifdef MOZ_DEBUG
|
||||
ifneq (,$(MOZ_DEBUG)$(MOZ_ASAN))
|
||||
MOZ_WINCONSOLE = 1
|
||||
else
|
||||
MOZ_WINCONSOLE = 0
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
browser.jar:
|
||||
% resource app %
|
||||
defaults/permissions (permissions)
|
||||
+8
-15
@@ -21,11 +21,10 @@ SOURCES += [
|
||||
|
||||
FINAL_TARGET_FILES += ['blocklist.xml']
|
||||
FINAL_TARGET_FILES.defaults.profile += ['profile/prefs.js']
|
||||
FINAL_TARGET_FILES.defaults += ['permissions']
|
||||
|
||||
DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
|
||||
|
||||
DEFINES['XPCOM_GLUE'] = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'!/build',
|
||||
'/toolkit/xre',
|
||||
@@ -36,8 +35,10 @@ LOCAL_INCLUDES += [
|
||||
DELAYLOAD_DLLS += [
|
||||
'mozglue.dll',
|
||||
]
|
||||
USE_STATIC_LIBS = True
|
||||
|
||||
USE_LIBS += [
|
||||
'mozglue',
|
||||
]
|
||||
|
||||
if CONFIG['_MSC_VER']:
|
||||
# Always enter a Windows program through wmain, whether or not we're
|
||||
@@ -59,16 +60,6 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
|
||||
LDFLAGS += ['/HEAP:0x40000']
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
USE_LIBS += [
|
||||
'mozglue',
|
||||
'xpcomglue_staticruntime',
|
||||
]
|
||||
else:
|
||||
USE_LIBS += [
|
||||
'xpcomglue',
|
||||
]
|
||||
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
if CONFIG['MOZ_LINKER']:
|
||||
@@ -77,7 +68,9 @@ if CONFIG['MOZ_LINKER']:
|
||||
if CONFIG['HAVE_CLOCK_MONOTONIC']:
|
||||
OS_LIBS += CONFIG['REALTIME_LIBS']
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
CXXFLAGS += ['-Wshadow']
|
||||
|
||||
for icon in ('firefox', 'document', 'newwindow', 'newtab', 'pbmode'):
|
||||
DEFINES[icon.upper() + '_ICO'] = '"%s/dist/branding/%s.ico"' % (
|
||||
TOPOBJDIR, icon)
|
||||
|
||||
@@ -43,3 +43,9 @@ def FirefoxBranding():
|
||||
'default48.png',
|
||||
'mozicon128.png',
|
||||
]
|
||||
FINAL_TARGET_FILES.icons += ['mozicon128.png']
|
||||
FINAL_TARGET_FILES.chrome.icons.default += [
|
||||
'default16.png',
|
||||
'default32.png',
|
||||
'default48.png',
|
||||
]
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
[
|
||||
{
|
||||
"version": "gcc 4.9.3",
|
||||
"size": 102421980,
|
||||
"visibility": "public",
|
||||
"digest": "f25292aa93dc449e0472eee511c0ac15b5f1a4272ab76cf53ce5d20dc57f29e83da49ae1a9d9e994192647f75e13ae60f75ba2ac3cb9d26d5f5d6cabf88de921",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gcc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"hg_id" : "ec7b7d2442e8",
|
||||
"algorithm" : "sha512",
|
||||
"digest" : "49627d734df52cb9e7319733da5a6be1812b9373355dc300ee5600b431122570e00d380d50c7c5b5003c462c2c2cb022494b42c4ad00f8eba01c2259cbe6e502",
|
||||
"filename" : "sixgill.tar.xz",
|
||||
"size" : 2628868,
|
||||
"unpack" : true
|
||||
},
|
||||
{
|
||||
"size": 12072532,
|
||||
"digest": "3915f8ec396c56a8a92e6f9695b70f09ce9d1582359d1258e37e3fd43a143bc974410e4cfc27f500e095f34a8956206e0ebf799b7287f0f38def0d5e34ed71c9",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 89319524,
|
||||
"digest": "5383d843c9f28abf0a6d254e9d975d96972d2c86d627ca836fa8e272a5d53230603b387d7d1499c49df7f84b1bb946946e800a85c88d968bdbe81c755fcb02e1",
|
||||
"algorithm": "sha512",
|
||||
"filename": "rustc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 167175,
|
||||
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
|
||||
"algorithm": "sha512",
|
||||
"filename": "sccache.tar.bz2",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
||||
+1
-1
@@ -9,7 +9,7 @@ MOZ_UPDATER=1
|
||||
MOZ_PHOENIX=1
|
||||
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
MOZ_MAINTENANCE_SERVICE=1
|
||||
#MOZ_MAINTENANCE_SERVICE=1
|
||||
if ! test "$HAVE_64BIT_BUILD"; then
|
||||
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
|
||||
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
|
||||
|
||||
@@ -724,6 +724,7 @@
|
||||
@RESPATH@/greprefs.js
|
||||
@RESPATH@/defaults/autoconfig/prefcalls.js
|
||||
@RESPATH@/browser/defaults/profile/prefs.js
|
||||
@RESPATH@/browser/defaults/permissions
|
||||
|
||||
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
|
||||
; Technically this is an app pref file, but we are keeping it in the original
|
||||
|
||||
@@ -407,21 +407,17 @@ NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsGeolocationRequest)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGeolocationRequest)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION(nsGeolocationRequest, mCallback, mErrorCallback, mLocator)
|
||||
|
||||
void
|
||||
nsGeolocationRequest::Notify()
|
||||
{
|
||||
StopTimeoutTimer();
|
||||
SetTimeoutTimer();
|
||||
NotifyErrorAndShutdown(nsIDOMGeoPositionError::TIMEOUT);
|
||||
}
|
||||
|
||||
void
|
||||
nsGeolocationRequest::NotifyErrorAndShutdown(uint16_t aErrorCode)
|
||||
{
|
||||
MOZ_ASSERT(!mShutdown, "timeout after shutdown");
|
||||
|
||||
if (!mIsWatchPositionRequest) {
|
||||
Shutdown();
|
||||
mLocator->RemoveRequest(this);
|
||||
@@ -718,16 +714,13 @@ nsGeolocationRequest::SendLocation(nsIDOMGeoPosition* aPosition)
|
||||
callback->Call(*wrapped);
|
||||
} else {
|
||||
nsIDOMGeoPositionCallback* callback = mCallback.GetXPCOMCallback();
|
||||
|
||||
MOZ_ASSERT(callback);
|
||||
callback->HandleEvent(aPosition);
|
||||
}
|
||||
|
||||
StopTimeoutTimer();
|
||||
SetTimeoutTimer();
|
||||
MOZ_ASSERT(mShutdown || mIsWatchPositionRequest,
|
||||
"non-shutdown getCurrentPosition request after callback!");
|
||||
}
|
||||
|
||||
nsIPrincipal*
|
||||
nsGeolocationRequest::GetPrincipal()
|
||||
{
|
||||
@@ -745,22 +738,10 @@ nsGeolocationRequest::Update(nsIDOMGeoPosition* aPosition)
|
||||
NS_DispatchToMainThread(ev);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGeolocationRequest::LocationUpdatePending()
|
||||
{
|
||||
if (!mTimeoutTimer) {
|
||||
SetTimeoutTimer();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGeolocationRequest::NotifyError(uint16_t aErrorCode)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
RefPtr<PositionError> positionError = new PositionError(mLocator, aErrorCode);
|
||||
positionError->NotifyCallback(mErrorCallback);
|
||||
return NS_OK;
|
||||
@@ -1030,30 +1011,17 @@ nsGeolocationService::Update(nsIDOMGeoPosition *aSomewhere)
|
||||
if (aSomewhere) {
|
||||
SetCachedPosition(aSomewhere);
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i< mGeolocators.Length(); i++) {
|
||||
mGeolocators[i]->Update(aSomewhere);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGeolocationService::LocationUpdatePending()
|
||||
{
|
||||
for (uint32_t i = 0; i< mGeolocators.Length(); i++) {
|
||||
mGeolocators[i]->LocationUpdatePending();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGeolocationService::NotifyError(uint16_t aErrorCode)
|
||||
{
|
||||
for (uint32_t i = 0; i < mGeolocators.Length(); i++) {
|
||||
mGeolocators[i]->NotifyError(aErrorCode);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1476,21 +1444,8 @@ Geolocation::Update(nsIDOMGeoPosition *aSomewhere)
|
||||
for (uint32_t i = 0; i < mWatchingCallbacks.Length(); i++) {
|
||||
mWatchingCallbacks[i]->Update(aSomewhere);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Geolocation::LocationUpdatePending()
|
||||
{
|
||||
// this event is only really interesting for watch callbacks
|
||||
for (uint32_t i = 0; i < mWatchingCallbacks.Length(); i++) {
|
||||
mWatchingCallbacks[i]->LocationUpdatePending();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Geolocation::NotifyError(uint16_t aErrorCode)
|
||||
{
|
||||
@@ -1498,7 +1453,6 @@ Geolocation::NotifyError(uint16_t aErrorCode)
|
||||
Shutdown();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::GEOLOCATION_ERROR, true);
|
||||
|
||||
for (uint32_t i = mPendingCallbacks.Length(); i > 0; i--) {
|
||||
|
||||
@@ -940,23 +940,14 @@ GonkGPSGeolocationProvider::NetworkLocationUpdate::Update(nsIDOMGeoPosition *pos
|
||||
provider->mLocationCallback->Update(provider->mLastGPSPosition);
|
||||
}
|
||||
}
|
||||
|
||||
provider->InjectLocation(lat, lon, acc);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GonkGPSGeolocationProvider::NetworkLocationUpdate::LocationUpdatePending()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GonkGPSGeolocationProvider::NetworkLocationUpdate::NotifyError(uint16_t error)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GonkGPSGeolocationProvider::Startup()
|
||||
{
|
||||
|
||||
@@ -125,25 +125,16 @@ CoreLocationLocationProvider::MLSUpdate::Update(nsIDOMGeoPosition *position)
|
||||
if (!coords) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mParentLocationProvider.Update(position);
|
||||
Telemetry::Accumulate(Telemetry::GEOLOCATION_OSX_SOURCE_IS_MLS, true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CoreLocationLocationProvider::MLSUpdate::LocationUpdatePending()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CoreLocationLocationProvider::MLSUpdate::NotifyError(uint16_t error)
|
||||
{
|
||||
mParentLocationProvider.NotifyError(error);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
class CoreLocationObjects {
|
||||
public:
|
||||
NS_METHOD Init(CoreLocationLocationProvider* aProvider) {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "prtime.h"
|
||||
#include "MLSFallback.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@@ -33,18 +34,9 @@ WindowsLocationProvider::MLSUpdate::Update(nsIDOMGeoPosition *aPosition)
|
||||
if (!coords) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// TODO add telemetry here to track volume of MLS vs native geo responses
|
||||
|
||||
Telemetry::Accumulate(Telemetry::GEOLOCATION_WIN8_SOURCE_IS_MLS, true);
|
||||
return mCallback->Update(aPosition);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WindowsLocationProvider::MLSUpdate::LocationUpdatePending()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
WindowsLocationProvider::MLSUpdate::NotifyError(uint16_t aError)
|
||||
{
|
||||
@@ -54,7 +46,6 @@ WindowsLocationProvider::MLSUpdate::NotifyError(uint16_t aError)
|
||||
return mCallback->NotifyError(aError);
|
||||
}
|
||||
|
||||
|
||||
class LocationEvent final : public ILocationEvents
|
||||
{
|
||||
public:
|
||||
@@ -185,6 +176,8 @@ LocationEvent::OnLocationChanged(REFIID aReportType,
|
||||
PR_Now());
|
||||
mCallback->Update(position);
|
||||
|
||||
Telemetry::Accumulate(Telemetry::GEOLOCATION_WIN8_SOURCE_IS_MLS, false);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,6 @@ DEFINES['EGLAPI'] = ""
|
||||
# ANGLE uses the STL, so we can't use Mozilla's derpy STL wrappers.
|
||||
DISABLE_STL_WRAPPING = True
|
||||
|
||||
ALLOW_COMPILER_WARNINGS = True
|
||||
|
||||
LOCAL_INCLUDES += [ '../../include', '../../src', '../../src/third_party/khronos' ]
|
||||
|
||||
DEFINES['LIBANGLE_IMPLEMENTATION'] = "1"
|
||||
|
||||
+13
-8
@@ -1584,6 +1584,7 @@ class MOZ_STACK_CLASS ModuleValidator
|
||||
MathNameMap standardLibraryMathNames_;
|
||||
AtomicsNameMap standardLibraryAtomicsNames_;
|
||||
SimdOperationNameMap standardLibrarySimdOpNames_;
|
||||
RootedFunction dummyFunction_;
|
||||
|
||||
// Validation-internal state:
|
||||
LifoAlloc validationLifo_;
|
||||
@@ -1661,6 +1662,7 @@ class MOZ_STACK_CLASS ModuleValidator
|
||||
standardLibraryMathNames_(cx),
|
||||
standardLibraryAtomicsNames_(cx),
|
||||
standardLibrarySimdOpNames_(cx),
|
||||
dummyFunction_(cx),
|
||||
validationLifo_(VALIDATION_LIFO_DEFAULT_CHUNK_SIZE),
|
||||
functions_(cx),
|
||||
funcPtrTables_(cx),
|
||||
@@ -1755,6 +1757,13 @@ class MOZ_STACK_CLASS ModuleValidator
|
||||
}
|
||||
#undef ADDSTDLIBSIMDOPNAME
|
||||
|
||||
// This flows into FunctionBox, so must be tenured.
|
||||
dummyFunction_ = NewScriptedFunction(cx_, 0, JSFunction::INTERPRETED, nullptr,
|
||||
/* proto = */ nullptr, gc::AllocKind::FUNCTION,
|
||||
TenuredObject);
|
||||
if (!dummyFunction_)
|
||||
return false;
|
||||
|
||||
UniqueModuleGeneratorData genData = MakeUnique<ModuleGeneratorData>(cx_, ModuleKind::AsmJS);
|
||||
if (!genData ||
|
||||
!genData->sigs.resize(MaxSigs) ||
|
||||
@@ -1788,6 +1797,7 @@ class MOZ_STACK_CLASS ModuleValidator
|
||||
ModuleGenerator& mg() { return mg_; }
|
||||
AsmJSParser& parser() const { return parser_; }
|
||||
TokenStream& tokenStream() const { return parser_.tokenStream; }
|
||||
RootedFunction& dummyFunction() { return dummyFunction_; }
|
||||
bool supportsSimd() const { return cx_->jitSupportsSimd(); }
|
||||
bool atomicsPresent() const { return atomicsPresent_; }
|
||||
uint32_t minHeapLength() const { return module_->minHeapLength; }
|
||||
@@ -6603,16 +6613,11 @@ ParseFunction(ModuleValidator& m, ParseNode** fnOut, unsigned* line)
|
||||
if (!fn)
|
||||
return false;
|
||||
|
||||
// This flows into FunctionBox, so must be tenured.
|
||||
RootedFunction fun(m.cx(),
|
||||
NewScriptedFunction(m.cx(), 0, JSFunction::INTERPRETED,
|
||||
name, /* proto = */ nullptr, gc::AllocKind::FUNCTION,
|
||||
TenuredObject));
|
||||
if (!fun)
|
||||
return false;
|
||||
RootedFunction& fun = m.dummyFunction();
|
||||
fun->setAtom(name);
|
||||
fun->setArgCount(0);
|
||||
|
||||
AsmJSParseContext* outerpc = m.parser().pc;
|
||||
|
||||
Directives directives(outerpc);
|
||||
FunctionBox* funbox = m.parser().newFunctionBox(fn, fun, outerpc, directives, NotGenerator);
|
||||
if (!funbox)
|
||||
|
||||
@@ -1356,6 +1356,10 @@ js::InitWasmClass(JSContext* cx, HandleObject global)
|
||||
if (!JS_DefineProperty(cx, global, js_Wasm_str, Wasm, JSPROP_RESOLVING))
|
||||
return nullptr;
|
||||
|
||||
RootedValue version(cx, Int32Value(EncodingVersion));
|
||||
if (!JS_DefineProperty(cx, Wasm, "experimentalVersion", version, JSPROP_RESOLVING))
|
||||
return nullptr;
|
||||
|
||||
if (!JS_DefineFunctions(cx, Wasm, wasm_static_methods))
|
||||
return nullptr;
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ function CanonicalizeLanguageTag(locale) {
|
||||
if (callFunction(std_Object_hasOwnProperty, langTagMappings, locale))
|
||||
return langTagMappings[locale];
|
||||
|
||||
var subtags = callFunction(String_split, locale, "-");
|
||||
var subtags = StringSplitString(ToString(locale), "-");
|
||||
var i = 0;
|
||||
|
||||
// Handle the standard part: All subtags before the first singleton or "x".
|
||||
@@ -837,7 +837,7 @@ function ResolveLocale(availableLocales, requestedLocales, options, relevantExte
|
||||
extensionIndex = r.extensionIndex;
|
||||
|
||||
// Steps 5.d-e.
|
||||
extensionSubtags = callFunction(String_split, extension, "-");
|
||||
extensionSubtags = StringSplitString(ToString(extension), "-");
|
||||
extensionSubtagsLength = extensionSubtags.length;
|
||||
}
|
||||
|
||||
|
||||
@@ -1302,13 +1302,14 @@ GlobalObject::initTypedObjectModule(JSContext* cx, Handle<GlobalObject*> global)
|
||||
|
||||
// Everything is setup, install module on the global object:
|
||||
RootedValue moduleValue(cx, ObjectValue(*module));
|
||||
global->setConstructor(JSProto_TypedObject, moduleValue);
|
||||
if (!DefineProperty(cx, global, cx->names().TypedObject, moduleValue, nullptr, nullptr,
|
||||
JSPROP_RESOLVING))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
global->setConstructor(JSProto_TypedObject, moduleValue);
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifdef DEBUG
|
||||
#define assert(b, info) if (!(b)) AssertionFailed(__FILE__ + ":" + __LINE__ + ": " + info)
|
||||
#define dbg(msg) DumpMessage(callFunction(std_Array_pop, \
|
||||
callFunction(std_String_split, __FILE__, '/')) \
|
||||
StringSplitString(__FILE__, '/')) \
|
||||
+ '#' + __LINE__ + ': ' + msg)
|
||||
#else
|
||||
#define assert(b, info) // Elided assertion.
|
||||
|
||||
@@ -106,6 +106,10 @@ JOBS = { 'dbs':
|
||||
'.'),
|
||||
()),
|
||||
|
||||
'list-dbs':
|
||||
(('ls', '-l'),
|
||||
()),
|
||||
|
||||
'callgraph':
|
||||
(('%(js)s', '%(analysis_scriptdir)s/computeCallgraph.js'),
|
||||
'callgraph.txt'),
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
if (!('oomTest' in this))
|
||||
quit();
|
||||
|
||||
oomTest(function() {
|
||||
offThreadCompileScript("");
|
||||
});
|
||||
"".match();
|
||||
@@ -0,0 +1,8 @@
|
||||
var g = newGlobal();
|
||||
var dbg = new Debugger(g);
|
||||
var g = newGlobal();
|
||||
g.evaluate("function f(x) { return x + 1; }");
|
||||
var gw = dbg.addDebuggee(g);
|
||||
gczeal(2, 1);
|
||||
var s = dbg.findScripts();
|
||||
gczeal(0);
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
var du = new Debugger();
|
||||
if (typeof du.setupTraceLogger === "function" &&
|
||||
typeof oomTest === 'function')
|
||||
{
|
||||
du.setupTraceLogger({
|
||||
Scripts: true
|
||||
})
|
||||
oomTest(() => function(){});
|
||||
}
|
||||
@@ -6,11 +6,11 @@ const magic1 = 0x61; // 'a'
|
||||
const magic2 = 0x73; // 's'
|
||||
const magic3 = 0x6d; // 'm'
|
||||
|
||||
// EncodingVersion = 11 (unofficial; to be reset at some point in the future)
|
||||
const ver0 = 0x0b;
|
||||
const ver1 = 0x00;
|
||||
const ver2 = 0x00;
|
||||
const ver3 = 0x00;
|
||||
// EncodingVersion (temporary; to be set to 1 at some point before release)
|
||||
const ver0 = (Wasm.experimentalVersion >>> 0) & 0xff;
|
||||
const ver1 = (Wasm.experimentalVersion >>> 8) & 0xff;
|
||||
const ver2 = (Wasm.experimentalVersion >>> 16) & 0xff;
|
||||
const ver3 = (Wasm.experimentalVersion >>> 24) & 0xff;
|
||||
|
||||
// Section names
|
||||
const sigId = "type";
|
||||
|
||||
@@ -843,6 +843,101 @@ BaselineCacheIRCompiler::emitLoadDynamicSlotResult()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineCacheIRCompiler::emitLoadUnboxedPropertyResult()
|
||||
{
|
||||
Register obj = allocator.useRegister(masm, reader.objOperandId());
|
||||
AutoScratchRegister scratch(allocator, masm);
|
||||
|
||||
JSValueType fieldType = reader.valueType();
|
||||
|
||||
Address fieldOffset(stubAddress(reader.stubOffset()));
|
||||
masm.load32(fieldOffset, scratch);
|
||||
masm.loadUnboxedProperty(BaseIndex(obj, scratch, TimesOne), fieldType, R0);
|
||||
|
||||
if (fieldType == JSVAL_TYPE_OBJECT)
|
||||
emitEnterTypeMonitorIC();
|
||||
else
|
||||
emitReturnFromIC();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineCacheIRCompiler::emitGuardNoDetachedTypedObjects()
|
||||
{
|
||||
FailurePath* failure;
|
||||
if (!addFailurePath(&failure))
|
||||
return false;
|
||||
|
||||
CheckForTypedObjectWithDetachedStorage(cx_, masm, failure->label());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineCacheIRCompiler::emitLoadTypedObjectResult()
|
||||
{
|
||||
Register obj = allocator.useRegister(masm, reader.objOperandId());
|
||||
AutoScratchRegister scratch1(allocator, masm);
|
||||
AutoScratchRegister scratch2(allocator, masm);
|
||||
|
||||
TypedThingLayout layout = reader.typedThingLayout();
|
||||
uint32_t typeDescr = reader.typeDescrKey();
|
||||
Address fieldOffset(stubAddress(reader.stubOffset()));
|
||||
|
||||
// Get the object's data pointer.
|
||||
LoadTypedThingData(masm, layout, obj, scratch1);
|
||||
|
||||
// Get the address being written to.
|
||||
masm.load32(fieldOffset, scratch2);
|
||||
masm.addPtr(scratch2, scratch1);
|
||||
|
||||
// Only monitor the result if the type produced by this stub might vary.
|
||||
bool monitorLoad;
|
||||
if (SimpleTypeDescrKeyIsScalar(typeDescr)) {
|
||||
Scalar::Type type = ScalarTypeFromSimpleTypeDescrKey(typeDescr);
|
||||
monitorLoad = type == Scalar::Uint32;
|
||||
|
||||
masm.loadFromTypedArray(type, Address(scratch1, 0), R0, /* allowDouble = */ true,
|
||||
scratch2, nullptr);
|
||||
} else {
|
||||
ReferenceTypeDescr::Type type = ReferenceTypeFromSimpleTypeDescrKey(typeDescr);
|
||||
monitorLoad = type != ReferenceTypeDescr::TYPE_STRING;
|
||||
|
||||
switch (type) {
|
||||
case ReferenceTypeDescr::TYPE_ANY:
|
||||
masm.loadValue(Address(scratch1, 0), R0);
|
||||
break;
|
||||
|
||||
case ReferenceTypeDescr::TYPE_OBJECT: {
|
||||
Label notNull, done;
|
||||
masm.loadPtr(Address(scratch1, 0), scratch1);
|
||||
masm.branchTestPtr(Assembler::NonZero, scratch1, scratch1, ¬Null);
|
||||
masm.moveValue(NullValue(), R0);
|
||||
masm.jump(&done);
|
||||
masm.bind(¬Null);
|
||||
masm.tagValue(JSVAL_TYPE_OBJECT, scratch1, R0);
|
||||
masm.bind(&done);
|
||||
break;
|
||||
}
|
||||
|
||||
case ReferenceTypeDescr::TYPE_STRING:
|
||||
masm.loadPtr(Address(scratch1, 0), scratch1);
|
||||
masm.tagValue(JSVAL_TYPE_STRING, scratch1, R0);
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_CRASH("Invalid ReferenceTypeDescr");
|
||||
}
|
||||
}
|
||||
|
||||
if (monitorLoad)
|
||||
emitEnterTypeMonitorIC();
|
||||
else
|
||||
emitReturnFromIC();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineCacheIRCompiler::emitLoadUndefinedResult()
|
||||
{
|
||||
|
||||
@@ -1410,7 +1410,9 @@ TryAttachGetElemStub(JSContext* cx, JSScript* script, jsbytecode* pc, ICGetElem_
|
||||
RootedObject obj(cx, &lhs.toObject());
|
||||
|
||||
// Check for ArgumentsObj[int] accesses
|
||||
if (obj->is<ArgumentsObject>() && rhs.isInt32()) {
|
||||
if (obj->is<ArgumentsObject>() && rhs.isInt32() &&
|
||||
!obj->as<ArgumentsObject>().hasOverriddenElement())
|
||||
{
|
||||
ICGetElem_Arguments::Which which = ICGetElem_Arguments::Mapped;
|
||||
if (obj->is<UnmappedArgumentsObject>())
|
||||
which = ICGetElem_Arguments::Unmapped;
|
||||
@@ -2280,10 +2282,11 @@ ICGetElem_Arguments::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
// Get initial ArgsObj length value.
|
||||
masm.unboxInt32(Address(objReg, ArgumentsObject::getInitialLengthSlotOffset()), scratchReg);
|
||||
|
||||
// Test if length has been overridden.
|
||||
// Test if length or any element have been overridden.
|
||||
masm.branchTest32(Assembler::NonZero,
|
||||
scratchReg,
|
||||
Imm32(ArgumentsObject::LENGTH_OVERRIDDEN_BIT),
|
||||
Imm32(ArgumentsObject::LENGTH_OVERRIDDEN_BIT |
|
||||
ArgumentsObject::ELEMENT_OVERRIDDEN_BIT),
|
||||
&failure);
|
||||
|
||||
// Length has not been overridden, ensure that R1 is an integer and is <= length.
|
||||
|
||||
@@ -108,8 +108,6 @@ AddReceiver(const ReceiverGuard& receiver,
|
||||
static bool
|
||||
GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub, ReceiverGuard* receiver)
|
||||
{
|
||||
// If this is a getprop stub to get an own object's read-slot stub.
|
||||
//
|
||||
// We match either:
|
||||
//
|
||||
// GuardIsObject 0
|
||||
@@ -125,6 +123,7 @@ GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub, ReceiverGuard* re
|
||||
// LoadUnboxedExpando 0
|
||||
// LoadFixedSlotResult or LoadDynamicSlotResult
|
||||
|
||||
*receiver = ReceiverGuard();
|
||||
CacheIRReader reader(stub->stubInfo());
|
||||
|
||||
ObjOperandId objId = ObjOperandId(0);
|
||||
@@ -154,6 +153,29 @@ GetCacheIRReceiverForNativeReadSlot(ICCacheIR_Monitored* stub, ReceiverGuard* re
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
GetCacheIRReceiverForUnboxedProperty(ICCacheIR_Monitored* stub, ReceiverGuard* receiver)
|
||||
{
|
||||
// We match:
|
||||
//
|
||||
// GuardIsObject 0
|
||||
// GuardGroup 0
|
||||
// LoadUnboxedPropertyResult 0 ..
|
||||
|
||||
*receiver = ReceiverGuard();
|
||||
CacheIRReader reader(stub->stubInfo());
|
||||
|
||||
ObjOperandId objId = ObjOperandId(0);
|
||||
if (!reader.matchOp(CacheOp::GuardIsObject, objId))
|
||||
return false;
|
||||
|
||||
if (!reader.matchOp(CacheOp::GuardGroup, objId))
|
||||
return false;
|
||||
receiver->group = stub->stubInfo()->getStubField<ObjectGroup*>(stub, reader.stubOffset());
|
||||
|
||||
return reader.matchOp(CacheOp::LoadUnboxedPropertyResult, objId);
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineInspector::maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receivers,
|
||||
ObjectGroupVector& convertUnboxedGroups)
|
||||
@@ -176,15 +198,15 @@ BaselineInspector::maybeInfoForPropertyOp(jsbytecode* pc, ReceiverVector& receiv
|
||||
while (stub->next()) {
|
||||
ReceiverGuard receiver;
|
||||
if (stub->isCacheIR_Monitored()) {
|
||||
if (!GetCacheIRReceiverForNativeReadSlot(stub->toCacheIR_Monitored(), &receiver)) {
|
||||
if (!GetCacheIRReceiverForNativeReadSlot(stub->toCacheIR_Monitored(), &receiver) &&
|
||||
!GetCacheIRReceiverForUnboxedProperty(stub->toCacheIR_Monitored(), &receiver))
|
||||
{
|
||||
receivers.clear();
|
||||
return true;
|
||||
}
|
||||
} else if (stub->isSetProp_Native()) {
|
||||
receiver = ReceiverGuard(stub->toSetProp_Native()->group(),
|
||||
stub->toSetProp_Native()->shape());
|
||||
} else if (stub->isGetProp_Unboxed()) {
|
||||
receiver = ReceiverGuard(stub->toGetProp_Unboxed()->group(), nullptr);
|
||||
} else if (stub->isSetProp_Unboxed()) {
|
||||
receiver = ReceiverGuard(stub->toSetProp_Unboxed()->group(), nullptr);
|
||||
} else {
|
||||
@@ -805,8 +827,6 @@ BaselineInspector::expectedPropertyAccessInputType(jsbytecode* pc)
|
||||
// Either an object or magic arguments.
|
||||
return MIRType::Value;
|
||||
|
||||
case ICStub::GetProp_Unboxed:
|
||||
case ICStub::GetProp_TypedObject:
|
||||
case ICStub::GetProp_CallScripted:
|
||||
case ICStub::GetProp_CallNative:
|
||||
case ICStub::GetProp_CallDOMProxyNative:
|
||||
|
||||
@@ -60,8 +60,12 @@ GetPropIRGenerator::tryAttachStub(Maybe<CacheIRWriter>& writer)
|
||||
return false;
|
||||
if (!emitted_ && !tryAttachNative(*writer, obj, objId))
|
||||
return false;
|
||||
if (!emitted_ && !tryAttachUnboxed(*writer, obj, objId))
|
||||
return false;
|
||||
if (!emitted_ && !tryAttachUnboxedExpando(*writer, obj, objId))
|
||||
return false;
|
||||
if (!emitted_ && !tryAttachTypedObject(*writer, obj, objId))
|
||||
return false;
|
||||
if (!emitted_ && !tryAttachModuleNamespace(*writer, obj, objId))
|
||||
return false;
|
||||
}
|
||||
@@ -257,6 +261,29 @@ GetPropIRGenerator::tryAttachNative(CacheIRWriter& writer, HandleObject obj, Obj
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GetPropIRGenerator::tryAttachUnboxed(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
|
||||
{
|
||||
MOZ_ASSERT(!emitted_);
|
||||
|
||||
if (!obj->is<UnboxedPlainObject>())
|
||||
return true;
|
||||
|
||||
const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(name_);
|
||||
if (!property)
|
||||
return true;
|
||||
|
||||
if (!cx_->runtime()->jitSupportsFloatingPoint)
|
||||
return true;
|
||||
|
||||
writer.guardGroup(objId, obj->group());
|
||||
writer.loadUnboxedPropertyResult(objId, property->type,
|
||||
UnboxedPlainObject::offsetOfData() + property->offset);
|
||||
emitted_ = true;
|
||||
preliminaryObjectAction_ = PreliminaryObjectAction::Unlink;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GetPropIRGenerator::tryAttachUnboxedExpando(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
|
||||
{
|
||||
@@ -279,6 +306,44 @@ GetPropIRGenerator::tryAttachUnboxedExpando(CacheIRWriter& writer, HandleObject
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GetPropIRGenerator::tryAttachTypedObject(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
|
||||
{
|
||||
MOZ_ASSERT(!emitted_);
|
||||
|
||||
if (!obj->is<TypedObject>() ||
|
||||
!cx_->runtime()->jitSupportsFloatingPoint ||
|
||||
cx_->compartment()->detachedTypedObjects)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
TypedObject* typedObj = &obj->as<TypedObject>();
|
||||
if (!typedObj->typeDescr().is<StructTypeDescr>())
|
||||
return true;
|
||||
|
||||
StructTypeDescr* structDescr = &typedObj->typeDescr().as<StructTypeDescr>();
|
||||
size_t fieldIndex;
|
||||
if (!structDescr->fieldIndex(NameToId(name_), &fieldIndex))
|
||||
return true;
|
||||
|
||||
TypeDescr* fieldDescr = &structDescr->fieldDescr(fieldIndex);
|
||||
if (!fieldDescr->is<SimpleTypeDescr>())
|
||||
return true;
|
||||
|
||||
Shape* shape = typedObj->maybeShape();
|
||||
TypedThingLayout layout = GetTypedThingLayout(shape->getObjectClass());
|
||||
|
||||
uint32_t fieldOffset = structDescr->fieldOffset(fieldIndex);
|
||||
uint32_t typeDescr = SimpleTypeDescrKey(&fieldDescr->as<SimpleTypeDescr>());
|
||||
|
||||
writer.guardNoDetachedTypedObjects();
|
||||
writer.guardShape(objId, shape);
|
||||
writer.loadTypedObjectResult(objId, fieldOffset, layout, typeDescr);
|
||||
emitted_ = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GetPropIRGenerator::tryAttachObjectLength(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId)
|
||||
{
|
||||
|
||||
@@ -84,6 +84,7 @@ class ObjOperandId : public OperandId
|
||||
_(GuardProto) \
|
||||
_(GuardClass) \
|
||||
_(GuardSpecificObject) \
|
||||
_(GuardNoDetachedTypedObjects) \
|
||||
_(GuardNoUnboxedExpando) \
|
||||
_(GuardAndLoadUnboxedExpando) \
|
||||
_(LoadObject) \
|
||||
@@ -91,6 +92,8 @@ class ObjOperandId : public OperandId
|
||||
_(LoadUnboxedExpando) \
|
||||
_(LoadFixedSlotResult) \
|
||||
_(LoadDynamicSlotResult) \
|
||||
_(LoadUnboxedPropertyResult) \
|
||||
_(LoadTypedObjectResult) \
|
||||
_(LoadInt32ArrayLengthResult) \
|
||||
_(LoadUnboxedArrayLengthResult) \
|
||||
_(LoadArgumentsObjectLengthResult) \
|
||||
@@ -264,6 +267,9 @@ class MOZ_RAII CacheIRWriter
|
||||
writeOpWithOperandId(CacheOp::GuardSpecificObject, obj);
|
||||
addStubWord(uintptr_t(expected), StubField::GCType::JSObject);
|
||||
}
|
||||
void guardNoDetachedTypedObjects() {
|
||||
writeOp(CacheOp::GuardNoDetachedTypedObjects);
|
||||
}
|
||||
void guardNoUnboxedExpando(ObjOperandId obj) {
|
||||
writeOpWithOperandId(CacheOp::GuardNoUnboxedExpando, obj);
|
||||
}
|
||||
@@ -304,6 +310,20 @@ class MOZ_RAII CacheIRWriter
|
||||
writeOpWithOperandId(CacheOp::LoadDynamicSlotResult, obj);
|
||||
addStubWord(offset, StubField::GCType::NoGCThing);
|
||||
}
|
||||
void loadUnboxedPropertyResult(ObjOperandId obj, JSValueType type, size_t offset) {
|
||||
writeOpWithOperandId(CacheOp::LoadUnboxedPropertyResult, obj);
|
||||
buffer_.writeByte(uint32_t(type));
|
||||
addStubWord(offset, StubField::GCType::NoGCThing);
|
||||
}
|
||||
void loadTypedObjectResult(ObjOperandId obj, uint32_t offset, TypedThingLayout layout,
|
||||
uint32_t typeDescr) {
|
||||
MOZ_ASSERT(uint32_t(layout) <= UINT8_MAX);
|
||||
MOZ_ASSERT(typeDescr <= UINT8_MAX);
|
||||
writeOpWithOperandId(CacheOp::LoadTypedObjectResult, obj);
|
||||
buffer_.writeByte(uint32_t(layout));
|
||||
buffer_.writeByte(typeDescr);
|
||||
addStubWord(offset, StubField::GCType::NoGCThing);
|
||||
}
|
||||
void loadInt32ArrayLengthResult(ObjOperandId obj) {
|
||||
writeOpWithOperandId(CacheOp::LoadInt32ArrayLengthResult, obj);
|
||||
}
|
||||
@@ -349,6 +369,9 @@ class MOZ_RAII CacheIRReader
|
||||
|
||||
uint32_t stubOffset() { return buffer_.readByte(); }
|
||||
GuardClassKind guardClassKind() { return GuardClassKind(buffer_.readByte()); }
|
||||
JSValueType valueType() { return JSValueType(buffer_.readByte()); }
|
||||
TypedThingLayout typedThingLayout() { return TypedThingLayout(buffer_.readByte()); }
|
||||
uint32_t typeDescrKey() { return buffer_.readByte(); }
|
||||
|
||||
bool matchOp(CacheOp op) {
|
||||
const uint8_t* pos = buffer_.currentPosition();
|
||||
@@ -388,7 +411,9 @@ class MOZ_RAII GetPropIRGenerator
|
||||
PreliminaryObjectAction preliminaryObjectAction_;
|
||||
|
||||
bool tryAttachNative(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
|
||||
bool tryAttachUnboxed(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
|
||||
bool tryAttachUnboxedExpando(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
|
||||
bool tryAttachTypedObject(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
|
||||
bool tryAttachObjectLength(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
|
||||
bool tryAttachModuleNamespace(CacheIRWriter& writer, HandleObject obj, ObjOperandId objId);
|
||||
|
||||
|
||||
@@ -542,6 +542,9 @@ IsOptimizableArgumentsObjectForGetElem(JSObject* obj, Value idval)
|
||||
if (argsObj.isAnyElementDeleted())
|
||||
return false;
|
||||
|
||||
if (argsObj.hasOverriddenElement())
|
||||
return false;
|
||||
|
||||
if (!idval.isInt32())
|
||||
return false;
|
||||
|
||||
@@ -4225,9 +4228,12 @@ GetPropertyIC::tryAttachArgumentsElement(JSContext* cx, HandleScript outerScript
|
||||
|
||||
masm.branchTestObjClass(Assembler::NotEqual, object(), tmpReg, obj->getClass(), &failures);
|
||||
|
||||
// Get initial ArgsObj length value, test if length has been overridden.
|
||||
// Get initial ArgsObj length value, test if length or any element have
|
||||
// been overridden.
|
||||
masm.unboxInt32(Address(object(), ArgumentsObject::getInitialLengthSlotOffset()), tmpReg);
|
||||
masm.branchTest32(Assembler::NonZero, tmpReg, Imm32(ArgumentsObject::LENGTH_OVERRIDDEN_BIT),
|
||||
masm.branchTest32(Assembler::NonZero, tmpReg,
|
||||
Imm32(ArgumentsObject::LENGTH_OVERRIDDEN_BIT |
|
||||
ArgumentsObject::ELEMENT_OVERRIDDEN_BIT),
|
||||
&failures);
|
||||
masm.rshiftPtr(Imm32(ArgumentsObject::PACKED_BITS_COUNT), tmpReg);
|
||||
|
||||
|
||||
@@ -404,16 +404,6 @@ ICStub::trace(JSTracer* trc)
|
||||
TraceEdge(trc, &propStub->protoShape(), "baseline-getprop-primitive-stub-shape");
|
||||
break;
|
||||
}
|
||||
case ICStub::GetProp_Unboxed: {
|
||||
ICGetProp_Unboxed* propStub = toGetProp_Unboxed();
|
||||
TraceEdge(trc, &propStub->group(), "baseline-getprop-unboxed-stub-group");
|
||||
break;
|
||||
}
|
||||
case ICStub::GetProp_TypedObject: {
|
||||
ICGetProp_TypedObject* propStub = toGetProp_TypedObject();
|
||||
TraceEdge(trc, &propStub->shape(), "baseline-getprop-typedobject-stub-shape");
|
||||
break;
|
||||
}
|
||||
case ICStub::GetProp_CallDOMProxyNative:
|
||||
case ICStub::GetProp_CallDOMProxyWithGenerationNative: {
|
||||
ICGetPropCallDOMProxyNativeStub* propStub;
|
||||
@@ -2562,80 +2552,6 @@ TryAttachNativeGetAccessorPropStub(JSContext* cx, SharedStubInfo* info,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachUnboxedGetPropStub(JSContext* cx, SharedStubInfo* info,
|
||||
ICGetProp_Fallback* stub, HandlePropertyName name,
|
||||
HandleValue val, bool* attached)
|
||||
{
|
||||
MOZ_ASSERT(!*attached);
|
||||
|
||||
if (!cx->runtime()->jitSupportsFloatingPoint)
|
||||
return true;
|
||||
|
||||
if (!val.isObject() || !val.toObject().is<UnboxedPlainObject>())
|
||||
return true;
|
||||
Rooted<UnboxedPlainObject*> obj(cx, &val.toObject().as<UnboxedPlainObject>());
|
||||
|
||||
const UnboxedLayout::Property* property = obj->layout().lookup(name);
|
||||
if (!property)
|
||||
return true;
|
||||
|
||||
ICStub* monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
|
||||
|
||||
ICGetProp_Unboxed::Compiler compiler(cx, info->engine(), monitorStub, obj->group(),
|
||||
property->offset + UnboxedPlainObject::offsetOfData(),
|
||||
property->type);
|
||||
ICStub* newStub = compiler.getStub(compiler.getStubSpace(info->outerScript(cx)));
|
||||
if (!newStub)
|
||||
return false;
|
||||
stub->addNewStub(newStub);
|
||||
|
||||
StripPreliminaryObjectStubs(cx, stub);
|
||||
|
||||
*attached = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachTypedObjectGetPropStub(JSContext* cx, SharedStubInfo* info,
|
||||
ICGetProp_Fallback* stub, HandlePropertyName name,
|
||||
HandleValue val, bool* attached)
|
||||
{
|
||||
MOZ_ASSERT(!*attached);
|
||||
|
||||
if (!cx->runtime()->jitSupportsFloatingPoint)
|
||||
return true;
|
||||
|
||||
if (!val.isObject() || !val.toObject().is<TypedObject>())
|
||||
return true;
|
||||
Rooted<TypedObject*> obj(cx, &val.toObject().as<TypedObject>());
|
||||
|
||||
if (!obj->typeDescr().is<StructTypeDescr>())
|
||||
return true;
|
||||
Rooted<StructTypeDescr*> structDescr(cx, &obj->typeDescr().as<StructTypeDescr>());
|
||||
|
||||
size_t fieldIndex;
|
||||
if (!structDescr->fieldIndex(NameToId(name), &fieldIndex))
|
||||
return true;
|
||||
|
||||
Rooted<TypeDescr*> fieldDescr(cx, &structDescr->fieldDescr(fieldIndex));
|
||||
if (!fieldDescr->is<SimpleTypeDescr>())
|
||||
return true;
|
||||
|
||||
uint32_t fieldOffset = structDescr->fieldOffset(fieldIndex);
|
||||
ICStub* monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
|
||||
|
||||
ICGetProp_TypedObject::Compiler compiler(cx, info->engine(), monitorStub, obj->maybeShape(),
|
||||
fieldOffset, &fieldDescr->as<SimpleTypeDescr>());
|
||||
ICStub* newStub = compiler.getStub(compiler.getStubSpace(info->outerScript(cx)));
|
||||
if (!newStub)
|
||||
return false;
|
||||
stub->addNewStub(newStub);
|
||||
|
||||
*attached = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
TryAttachPrimitiveGetPropStub(JSContext* cx, SharedStubInfo* info,
|
||||
ICGetProp_Fallback* stub, HandlePropertyName name,
|
||||
@@ -2869,16 +2785,6 @@ DoGetPropFallback(JSContext* cx, void* payload, ICGetProp_Fallback* stub_,
|
||||
return true;
|
||||
|
||||
|
||||
if (!TryAttachUnboxedGetPropStub(cx, &info, stub, name, val, &attached))
|
||||
return false;
|
||||
if (attached)
|
||||
return true;
|
||||
|
||||
if (!TryAttachTypedObjectGetPropStub(cx, &info, stub, name, val, &attached))
|
||||
return false;
|
||||
if (attached)
|
||||
return true;
|
||||
|
||||
if (val.isString() || val.isNumber() || val.isBoolean()) {
|
||||
if (!TryAttachPrimitiveGetPropStub(cx, &info, stub, name, val, res, &attached))
|
||||
return false;
|
||||
@@ -3762,39 +3668,6 @@ ICGetProp_Generic::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ICGetProp_Unboxed::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
{
|
||||
Label failure;
|
||||
|
||||
AllocatableGeneralRegisterSet regs(availableGeneralRegs(1));
|
||||
|
||||
Register scratch = regs.takeAnyExcluding(ICTailCallReg);
|
||||
|
||||
// Object and group guard.
|
||||
masm.branchTestObject(Assembler::NotEqual, R0, &failure);
|
||||
Register object = masm.extractObject(R0, ExtractTemp0);
|
||||
masm.loadPtr(Address(ICStubReg, ICGetProp_Unboxed::offsetOfGroup()), scratch);
|
||||
masm.branchPtr(Assembler::NotEqual, Address(object, JSObject::offsetOfGroup()), scratch,
|
||||
&failure);
|
||||
|
||||
// Get the address being read from.
|
||||
masm.load32(Address(ICStubReg, ICGetProp_Unboxed::offsetOfFieldOffset()), scratch);
|
||||
|
||||
masm.loadUnboxedProperty(BaseIndex(object, scratch, TimesOne), fieldType_, TypedOrValueRegister(R0));
|
||||
|
||||
// Only monitor the result if its type might change.
|
||||
if (fieldType_ == JSVAL_TYPE_OBJECT)
|
||||
EmitEnterTypeMonitorIC(masm);
|
||||
else
|
||||
EmitReturnFromIC(masm);
|
||||
|
||||
masm.bind(&failure);
|
||||
EmitStubGuardFailure(masm);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CheckForTypedObjectWithDetachedStorage(JSContext* cx, MacroAssembler& masm, Label* failure)
|
||||
{
|
||||
@@ -3823,82 +3696,6 @@ LoadTypedThingData(MacroAssembler& masm, TypedThingLayout layout, Register obj,
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ICGetProp_TypedObject::Compiler::generateStubCode(MacroAssembler& masm)
|
||||
{
|
||||
Label failure;
|
||||
|
||||
CheckForTypedObjectWithDetachedStorage(cx, masm, &failure);
|
||||
|
||||
AllocatableGeneralRegisterSet regs(availableGeneralRegs(1));
|
||||
|
||||
Register scratch1 = regs.takeAnyExcluding(ICTailCallReg);
|
||||
Register scratch2 = regs.takeAnyExcluding(ICTailCallReg);
|
||||
|
||||
// Object and shape guard.
|
||||
masm.branchTestObject(Assembler::NotEqual, R0, &failure);
|
||||
Register object = masm.extractObject(R0, ExtractTemp0);
|
||||
masm.loadPtr(Address(ICStubReg, ICGetProp_TypedObject::offsetOfShape()), scratch1);
|
||||
masm.branchTestObjShape(Assembler::NotEqual, object, scratch1, &failure);
|
||||
|
||||
// Get the object's data pointer.
|
||||
LoadTypedThingData(masm, layout_, object, scratch1);
|
||||
|
||||
// Get the address being written to.
|
||||
masm.load32(Address(ICStubReg, ICGetProp_TypedObject::offsetOfFieldOffset()), scratch2);
|
||||
masm.addPtr(scratch2, scratch1);
|
||||
|
||||
// Only monitor the result if the type produced by this stub might vary.
|
||||
bool monitorLoad;
|
||||
|
||||
if (fieldDescr_->is<ScalarTypeDescr>()) {
|
||||
Scalar::Type type = fieldDescr_->as<ScalarTypeDescr>().type();
|
||||
monitorLoad = type == Scalar::Uint32;
|
||||
|
||||
masm.loadFromTypedArray(type, Address(scratch1, 0), R0, /* allowDouble = */ true,
|
||||
scratch2, nullptr);
|
||||
} else {
|
||||
ReferenceTypeDescr::Type type = fieldDescr_->as<ReferenceTypeDescr>().type();
|
||||
monitorLoad = type != ReferenceTypeDescr::TYPE_STRING;
|
||||
|
||||
switch (type) {
|
||||
case ReferenceTypeDescr::TYPE_ANY:
|
||||
masm.loadValue(Address(scratch1, 0), R0);
|
||||
break;
|
||||
|
||||
case ReferenceTypeDescr::TYPE_OBJECT: {
|
||||
Label notNull, done;
|
||||
masm.loadPtr(Address(scratch1, 0), scratch1);
|
||||
masm.branchTestPtr(Assembler::NonZero, scratch1, scratch1, ¬Null);
|
||||
masm.moveValue(NullValue(), R0);
|
||||
masm.jump(&done);
|
||||
masm.bind(¬Null);
|
||||
masm.tagValue(JSVAL_TYPE_OBJECT, scratch1, R0);
|
||||
masm.bind(&done);
|
||||
break;
|
||||
}
|
||||
|
||||
case ReferenceTypeDescr::TYPE_STRING:
|
||||
masm.loadPtr(Address(scratch1, 0), scratch1);
|
||||
masm.tagValue(JSVAL_TYPE_STRING, scratch1, R0);
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
}
|
||||
}
|
||||
|
||||
if (monitorLoad)
|
||||
EmitEnterTypeMonitorIC(masm);
|
||||
else
|
||||
EmitReturnFromIC(masm);
|
||||
|
||||
masm.bind(&failure);
|
||||
EmitStubGuardFailure(masm);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
BaselineScript::noteAccessedGetter(uint32_t pcOffset)
|
||||
{
|
||||
|
||||
+16
-117
@@ -2595,65 +2595,6 @@ class ICGetPropNativeCompiler : public ICStubCompiler
|
||||
ICGetPropNativeStub* getStub(ICStubSpace* space);
|
||||
};
|
||||
|
||||
class ICGetProp_Unboxed : public ICMonitoredStub
|
||||
{
|
||||
friend class ICStubSpace;
|
||||
|
||||
HeapPtrObjectGroup group_;
|
||||
uint32_t fieldOffset_;
|
||||
|
||||
ICGetProp_Unboxed(JitCode* stubCode, ICStub* firstMonitorStub, ObjectGroup* group,
|
||||
uint32_t fieldOffset)
|
||||
: ICMonitoredStub(ICStub::GetProp_Unboxed, stubCode, firstMonitorStub),
|
||||
group_(group), fieldOffset_(fieldOffset)
|
||||
{
|
||||
(void) fieldOffset_; // Silence clang warning
|
||||
}
|
||||
|
||||
public:
|
||||
HeapPtrObjectGroup& group() {
|
||||
return group_;
|
||||
}
|
||||
|
||||
static size_t offsetOfGroup() {
|
||||
return offsetof(ICGetProp_Unboxed, group_);
|
||||
}
|
||||
static size_t offsetOfFieldOffset() {
|
||||
return offsetof(ICGetProp_Unboxed, fieldOffset_);
|
||||
}
|
||||
|
||||
class Compiler : public ICStubCompiler {
|
||||
protected:
|
||||
ICStub* firstMonitorStub_;
|
||||
RootedObjectGroup group_;
|
||||
uint32_t fieldOffset_;
|
||||
JSValueType fieldType_;
|
||||
|
||||
bool generateStubCode(MacroAssembler& masm);
|
||||
|
||||
virtual int32_t getKey() const {
|
||||
return static_cast<int32_t>(engine_) |
|
||||
(static_cast<int32_t>(kind) << 1) |
|
||||
(static_cast<int32_t>(fieldType_) << 17);
|
||||
}
|
||||
|
||||
public:
|
||||
Compiler(JSContext* cx, Engine engine, ICStub* firstMonitorStub,
|
||||
ObjectGroup* group, uint32_t fieldOffset, JSValueType fieldType)
|
||||
: ICStubCompiler(cx, ICStub::GetProp_Unboxed, engine),
|
||||
firstMonitorStub_(firstMonitorStub),
|
||||
group_(cx, group),
|
||||
fieldOffset_(fieldOffset),
|
||||
fieldType_(fieldType)
|
||||
{}
|
||||
|
||||
ICStub* getStub(ICStubSpace* space) {
|
||||
return newStub<ICGetProp_Unboxed>(space, getStubCode(), firstMonitorStub_, group_,
|
||||
fieldOffset_);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
static uint32_t
|
||||
SimpleTypeDescrKey(SimpleTypeDescr* descr)
|
||||
{
|
||||
@@ -2662,67 +2603,25 @@ SimpleTypeDescrKey(SimpleTypeDescr* descr)
|
||||
return (uint32_t(descr->as<ReferenceTypeDescr>().type()) << 1) | 1;
|
||||
}
|
||||
|
||||
class ICGetProp_TypedObject : public ICMonitoredStub
|
||||
inline bool
|
||||
SimpleTypeDescrKeyIsScalar(uint32_t key)
|
||||
{
|
||||
friend class ICStubSpace;
|
||||
return !(key & 1);
|
||||
}
|
||||
|
||||
HeapPtrShape shape_;
|
||||
uint32_t fieldOffset_;
|
||||
inline ScalarTypeDescr::Type
|
||||
ScalarTypeFromSimpleTypeDescrKey(uint32_t key)
|
||||
{
|
||||
MOZ_ASSERT(SimpleTypeDescrKeyIsScalar(key));
|
||||
return ScalarTypeDescr::Type(key >> 1);
|
||||
}
|
||||
|
||||
ICGetProp_TypedObject(JitCode* stubCode, ICStub* firstMonitorStub, Shape* shape,
|
||||
uint32_t fieldOffset)
|
||||
: ICMonitoredStub(ICStub::GetProp_TypedObject, stubCode, firstMonitorStub),
|
||||
shape_(shape), fieldOffset_(fieldOffset)
|
||||
{
|
||||
(void) fieldOffset_; // Silence clang warning
|
||||
}
|
||||
|
||||
public:
|
||||
HeapPtrShape& shape() {
|
||||
return shape_;
|
||||
}
|
||||
|
||||
static size_t offsetOfShape() {
|
||||
return offsetof(ICGetProp_TypedObject, shape_);
|
||||
}
|
||||
static size_t offsetOfFieldOffset() {
|
||||
return offsetof(ICGetProp_TypedObject, fieldOffset_);
|
||||
}
|
||||
|
||||
class Compiler : public ICStubCompiler {
|
||||
protected:
|
||||
ICStub* firstMonitorStub_;
|
||||
RootedShape shape_;
|
||||
uint32_t fieldOffset_;
|
||||
TypedThingLayout layout_;
|
||||
Rooted<SimpleTypeDescr*> fieldDescr_;
|
||||
|
||||
bool generateStubCode(MacroAssembler& masm);
|
||||
|
||||
virtual int32_t getKey() const {
|
||||
return static_cast<int32_t>(engine_) |
|
||||
(static_cast<int32_t>(kind) << 1) |
|
||||
(static_cast<int32_t>(SimpleTypeDescrKey(fieldDescr_)) << 17) |
|
||||
(static_cast<int32_t>(layout_) << 25);
|
||||
}
|
||||
|
||||
public:
|
||||
Compiler(JSContext* cx, Engine engine, ICStub* firstMonitorStub,
|
||||
Shape* shape, uint32_t fieldOffset, SimpleTypeDescr* fieldDescr)
|
||||
: ICStubCompiler(cx, ICStub::GetProp_TypedObject, engine),
|
||||
firstMonitorStub_(firstMonitorStub),
|
||||
shape_(cx, shape),
|
||||
fieldOffset_(fieldOffset),
|
||||
layout_(GetTypedThingLayout(shape->getObjectClass())),
|
||||
fieldDescr_(cx, fieldDescr)
|
||||
{}
|
||||
|
||||
ICStub* getStub(ICStubSpace* space) {
|
||||
return newStub<ICGetProp_TypedObject>(space, getStubCode(), firstMonitorStub_, shape_,
|
||||
fieldOffset_);
|
||||
}
|
||||
};
|
||||
};
|
||||
inline ReferenceTypeDescr::Type
|
||||
ReferenceTypeFromSimpleTypeDescrKey(uint32_t key)
|
||||
{
|
||||
MOZ_ASSERT(!SimpleTypeDescrKeyIsScalar(key));
|
||||
return ReferenceTypeDescr::Type(key >> 1);
|
||||
}
|
||||
|
||||
class ICGetPropCallGetter : public ICMonitoredStub
|
||||
{
|
||||
|
||||
@@ -37,8 +37,6 @@ namespace jit {
|
||||
_(GetProp_Fallback) \
|
||||
_(GetProp_Primitive) \
|
||||
_(GetProp_StringLength) \
|
||||
_(GetProp_Unboxed) \
|
||||
_(GetProp_TypedObject) \
|
||||
_(GetProp_CallScripted) \
|
||||
_(GetProp_CallNative) \
|
||||
_(GetProp_CallNativeGlobal) \
|
||||
|
||||
@@ -1141,22 +1141,22 @@ CodeGeneratorARM::emitTableSwitchDispatch(MTableSwitch* mir, Register index, Reg
|
||||
void
|
||||
CodeGeneratorARM::visitMathD(LMathD* math)
|
||||
{
|
||||
const LAllocation* src1 = math->getOperand(0);
|
||||
const LAllocation* src2 = math->getOperand(1);
|
||||
const LDefinition* output = math->getDef(0);
|
||||
FloatRegister src1 = ToFloatRegister(math->getOperand(0));
|
||||
FloatRegister src2 = ToFloatRegister(math->getOperand(1));
|
||||
FloatRegister output = ToFloatRegister(math->getDef(0));
|
||||
|
||||
switch (math->jsop()) {
|
||||
case JSOP_ADD:
|
||||
masm.ma_vadd(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vadd(src1, src2, output);
|
||||
break;
|
||||
case JSOP_SUB:
|
||||
masm.ma_vsub(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vsub(src1, src2, output);
|
||||
break;
|
||||
case JSOP_MUL:
|
||||
masm.ma_vmul(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vmul(src1, src2, output);
|
||||
break;
|
||||
case JSOP_DIV:
|
||||
masm.ma_vdiv(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vdiv(src1, src2, output);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected opcode");
|
||||
@@ -1166,22 +1166,22 @@ CodeGeneratorARM::visitMathD(LMathD* math)
|
||||
void
|
||||
CodeGeneratorARM::visitMathF(LMathF* math)
|
||||
{
|
||||
const LAllocation* src1 = math->getOperand(0);
|
||||
const LAllocation* src2 = math->getOperand(1);
|
||||
const LDefinition* output = math->getDef(0);
|
||||
FloatRegister src1 = ToFloatRegister(math->getOperand(0));
|
||||
FloatRegister src2 = ToFloatRegister(math->getOperand(1));
|
||||
FloatRegister output = ToFloatRegister(math->getDef(0));
|
||||
|
||||
switch (math->jsop()) {
|
||||
case JSOP_ADD:
|
||||
masm.ma_vadd_f32(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vadd_f32(src1, src2, output);
|
||||
break;
|
||||
case JSOP_SUB:
|
||||
masm.ma_vsub_f32(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vsub_f32(src1, src2, output);
|
||||
break;
|
||||
case JSOP_MUL:
|
||||
masm.ma_vmul_f32(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vmul_f32(src1, src2, output);
|
||||
break;
|
||||
case JSOP_DIV:
|
||||
masm.ma_vdiv_f32(ToFloatRegister(src1), ToFloatRegister(src2), ToFloatRegister(output));
|
||||
masm.ma_vdiv_f32(src1, src2, output);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected opcode");
|
||||
@@ -2318,10 +2318,11 @@ CodeGeneratorARM::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
|
||||
MOZ_ASSERT(ptrImm >= 0);
|
||||
if (isFloat) {
|
||||
VFPRegister vd(ToFloatRegister(ins->value()));
|
||||
Address addr(HeapReg, ptrImm);
|
||||
if (size == 32)
|
||||
masm.ma_vstr(vd.singleOverlay(), Address(HeapReg, ptrImm), Assembler::Always);
|
||||
masm.ma_vstr(vd.singleOverlay(), addr, Assembler::Always);
|
||||
else
|
||||
masm.ma_vstr(vd, Address(HeapReg, ptrImm), Assembler::Always);
|
||||
masm.ma_vstr(vd, addr, Assembler::Always);
|
||||
} else {
|
||||
masm.ma_dataTransferN(IsStore, size, isSigned, HeapReg, Imm32(ptrImm),
|
||||
ToRegister(ins->value()), Offset, Assembler::Always);
|
||||
|
||||
@@ -979,22 +979,22 @@ CodeGeneratorMIPSShared::toMoveOperand(LAllocation a) const
|
||||
void
|
||||
CodeGeneratorMIPSShared::visitMathD(LMathD* math)
|
||||
{
|
||||
const LAllocation* src1 = math->getOperand(0);
|
||||
const LAllocation* src2 = math->getOperand(1);
|
||||
const LDefinition* output = math->getDef(0);
|
||||
FloatRegister src1 = ToFloatRegister(math->getOperand(0));
|
||||
FloatRegister src2 = ToFloatRegister(math->getOperand(1));
|
||||
FloatRegister output = ToFloatRegister(math->getDef(0));
|
||||
|
||||
switch (math->jsop()) {
|
||||
case JSOP_ADD:
|
||||
masm.as_addd(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_addd(output, src1, src2);
|
||||
break;
|
||||
case JSOP_SUB:
|
||||
masm.as_subd(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_subd(output, src1, src2);
|
||||
break;
|
||||
case JSOP_MUL:
|
||||
masm.as_muld(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_muld(output, src1, src2);
|
||||
break;
|
||||
case JSOP_DIV:
|
||||
masm.as_divd(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_divd(output, src1, src2);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected opcode");
|
||||
@@ -1004,22 +1004,22 @@ CodeGeneratorMIPSShared::visitMathD(LMathD* math)
|
||||
void
|
||||
CodeGeneratorMIPSShared::visitMathF(LMathF* math)
|
||||
{
|
||||
const LAllocation* src1 = math->getOperand(0);
|
||||
const LAllocation* src2 = math->getOperand(1);
|
||||
const LDefinition* output = math->getDef(0);
|
||||
FloatRegister src1 = ToFloatRegister(math->getOperand(0));
|
||||
FloatRegister src2 = ToFloatRegister(math->getOperand(1));
|
||||
FloatRegister output = ToFloatRegister(math->getDef(0));
|
||||
|
||||
switch (math->jsop()) {
|
||||
case JSOP_ADD:
|
||||
masm.as_adds(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_adds(output, src1, src2);
|
||||
break;
|
||||
case JSOP_SUB:
|
||||
masm.as_subs(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_subs(output, src1, src2);
|
||||
break;
|
||||
case JSOP_MUL:
|
||||
masm.as_muls(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_muls(output, src1, src2);
|
||||
break;
|
||||
case JSOP_DIV:
|
||||
masm.as_divs(ToFloatRegister(output), ToFloatRegister(src1), ToFloatRegister(src2));
|
||||
masm.as_divs(output, src1, src2);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unexpected opcode");
|
||||
@@ -1703,11 +1703,12 @@ CodeGeneratorMIPSShared::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
|
||||
MOZ_ASSERT(ptrImm >= 0);
|
||||
|
||||
if (isFloat) {
|
||||
if (size == 32) {
|
||||
masm.storeFloat32(ToFloatRegister(value), Address(HeapReg, ptrImm));
|
||||
} else {
|
||||
masm.storeDouble(ToFloatRegister(value), Address(HeapReg, ptrImm));
|
||||
}
|
||||
FloatRegister freg = ToFloatRegister(value);
|
||||
Address addr(HeapReg, ptrImm);
|
||||
if (size == 32)
|
||||
masm.storeFloat32(freg, addr);
|
||||
else
|
||||
masm.storeDouble(freg, addr);
|
||||
} else {
|
||||
masm.ma_store(ToRegister(value), Address(HeapReg, ptrImm),
|
||||
static_cast<LoadStoreSize>(size), isSigned ? SignExtend : ZeroExtend);
|
||||
@@ -1721,10 +1722,12 @@ CodeGeneratorMIPSShared::visitAsmJSStoreHeap(LAsmJSStoreHeap* ins)
|
||||
|
||||
if (!mir->needsBoundsCheck()) {
|
||||
if (isFloat) {
|
||||
if (size == 32) {
|
||||
masm.storeFloat32(ToFloatRegister(value), BaseIndex(HeapReg, ptrReg, TimesOne));
|
||||
} else
|
||||
masm.storeDouble(ToFloatRegister(value), BaseIndex(HeapReg, ptrReg, TimesOne));
|
||||
FloatRegister freg = ToFloatRegister(value);
|
||||
BaseIndex bi(HeapReg, ptrReg, TimesOne);
|
||||
if (size == 32)
|
||||
masm.storeFloat32(freg, bi);
|
||||
else
|
||||
masm.storeDouble(freg, bi);
|
||||
} else {
|
||||
masm.ma_store(ToRegister(value), BaseIndex(HeapReg, ptrReg, TimesOne),
|
||||
static_cast<LoadStoreSize>(size), isSigned ? SignExtend : ZeroExtend);
|
||||
|
||||
@@ -208,8 +208,10 @@ case "$target" in
|
||||
# secure CRT functions.
|
||||
# MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign)
|
||||
# on non-Western system locales even if it is in a comment.
|
||||
# MSVC warning wd4595 warns non-member operator new or delete functions
|
||||
# may not be declared inline, as of VS2015 Update 2.
|
||||
CFLAGS="$CFLAGS -wd4819"
|
||||
CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4819 -D_CRT_SECURE_NO_WARNINGS"
|
||||
CXXFLAGS="$CXXFLAGS -wd4345 -wd4351 -wd4800 -wd4819 -wd4595 -D_CRT_SECURE_NO_WARNINGS"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_TRY_COMPILE([#include <stdio.h>],
|
||||
|
||||
@@ -10,11 +10,5 @@ endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# People expect the js shell to wind up in the top-level JS dir.
|
||||
libs::
|
||||
$(INSTALL) $(IFLAGS2) $(PROGRAM) ..
|
||||
|
||||
GARBAGE += ../$(PROGRAM)
|
||||
|
||||
install:: $(PROGRAM)
|
||||
$(SYSINSTALL) $^ $(DESTDIR)$(bindir)
|
||||
|
||||
@@ -54,3 +54,6 @@ if CONFIG['_MSC_VER']:
|
||||
DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
|
||||
FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
|
||||
OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']
|
||||
|
||||
# People expect the js shell to wind up in the top-level JS dir.
|
||||
OBJDIR_FILES.js.src += ['!js%s' % CONFIG['BIN_SUFFIX']]
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
var BUGNUMBER = 1263811;
|
||||
var summary = "GetElem for modified arguments shouldn't be optimized to get original argument.";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
function testModifyFirst() {
|
||||
function f() {
|
||||
Object.defineProperty(arguments, 1, { value: 30 });
|
||||
assertEq(arguments[1], 30);
|
||||
}
|
||||
for (let i = 0; i < 10; i++)
|
||||
f(10, 20);
|
||||
}
|
||||
testModifyFirst();
|
||||
|
||||
function testModifyLater() {
|
||||
function f() {
|
||||
var ans = 20;
|
||||
for (let i = 0; i < 10; i++) {
|
||||
if (i == 5) {
|
||||
Object.defineProperty(arguments, 1, { value: 30 });
|
||||
ans = 30;
|
||||
}
|
||||
assertEq(arguments[1], ans);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < 10; i++)
|
||||
f(10, 20);
|
||||
}
|
||||
testModifyLater();
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
@@ -0,0 +1,30 @@
|
||||
var BUGNUMBER = 1268138;
|
||||
var summary = 'Internal usage of split should not be affected by prototpe change';
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
function test() {
|
||||
var t = 24*60*60*1000;
|
||||
var possibleAnswer = ["1.1.1970", "2.1.1970", "3.1.1970"];
|
||||
|
||||
String.prototype[Symbol.split] = function(s, limit) { return [""]; };
|
||||
var s = Intl.DateTimeFormat("de", {}).format(t);
|
||||
assertEq(possibleAnswer.includes(s), true);
|
||||
|
||||
String.prototype[Symbol.split] = function(s, limit) { return ["x-foo"]; };
|
||||
s = Intl.DateTimeFormat("de", {}).format(t);
|
||||
assertEq(possibleAnswer.includes(s), true);
|
||||
|
||||
String.prototype[Symbol.split] = function(s, limit) { return ["de-u-co"]; };
|
||||
s = Intl.DateTimeFormat("de", {}).format(t);
|
||||
assertEq(possibleAnswer.includes(s), true);
|
||||
|
||||
String.prototype[Symbol.split] = function(s, limit) { return ["en-US"]; };
|
||||
s = Intl.DateTimeFormat("de", {}).format(t);
|
||||
assertEq(possibleAnswer.includes(s), true);
|
||||
}
|
||||
|
||||
if (this.hasOwnProperty("Intl"))
|
||||
test();
|
||||
|
||||
reportCompare(0, 0, "ok");
|
||||
@@ -127,7 +127,11 @@ class ArgumentsObject : public NativeObject
|
||||
public:
|
||||
static const uint32_t LENGTH_OVERRIDDEN_BIT = 0x1;
|
||||
static const uint32_t ITERATOR_OVERRIDDEN_BIT = 0x2;
|
||||
static const uint32_t PACKED_BITS_COUNT = 2;
|
||||
static const uint32_t ELEMENT_OVERRIDDEN_BIT = 0x4;
|
||||
static const uint32_t PACKED_BITS_COUNT = 3;
|
||||
|
||||
static_assert(ARGS_LENGTH_MAX <= (UINT32_MAX >> PACKED_BITS_COUNT),
|
||||
"Max arguments length must fit in available bits");
|
||||
|
||||
protected:
|
||||
template <typename CopyArgs>
|
||||
@@ -199,6 +203,18 @@ class ArgumentsObject : public NativeObject
|
||||
setFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(v));
|
||||
}
|
||||
|
||||
/* True iff any element has been assigned or its attributes
|
||||
* changed. */
|
||||
bool hasOverriddenElement() const {
|
||||
const Value& v = getFixedSlot(INITIAL_LENGTH_SLOT);
|
||||
return v.toInt32() & ELEMENT_OVERRIDDEN_BIT;
|
||||
}
|
||||
|
||||
void markElementOverridden() {
|
||||
uint32_t v = getFixedSlot(INITIAL_LENGTH_SLOT).toInt32() | ELEMENT_OVERRIDDEN_BIT;
|
||||
setFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(v));
|
||||
}
|
||||
|
||||
/*
|
||||
* Because the arguments object is a real object, its elements may be
|
||||
* deleted. This is implemented by setting a 'deleted' flag for the arg
|
||||
|
||||
@@ -1429,12 +1429,6 @@ js::InitArrayBufferClass(JSContext* cx, HandleObject obj)
|
||||
if (!ctor)
|
||||
return nullptr;
|
||||
|
||||
if (!GlobalObject::initBuiltinConstructor(cx, global, JSProto_ArrayBuffer,
|
||||
ctor, arrayBufferProto))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!LinkConstructorAndPrototype(cx, ctor, arrayBufferProto))
|
||||
return nullptr;
|
||||
|
||||
@@ -1461,6 +1455,12 @@ js::InitArrayBufferClass(JSContext* cx, HandleObject obj)
|
||||
if (!JS_DefineFunctions(cx, arrayBufferProto, ArrayBufferObject::jsfuncs))
|
||||
return nullptr;
|
||||
|
||||
if (!GlobalObject::initBuiltinConstructor(cx, global, JSProto_ArrayBuffer,
|
||||
ctor, arrayBufferProto))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return arrayBufferProto;
|
||||
}
|
||||
|
||||
|
||||
+13
-8
@@ -3973,7 +3973,7 @@ class MOZ_STACK_CLASS Debugger::ScriptQuery
|
||||
* this query, and append the matching scripts to |vector|.
|
||||
*/
|
||||
bool findScripts() {
|
||||
if (!prepareQuery())
|
||||
if (!prepareQuery() || !delazifyScripts())
|
||||
return false;
|
||||
|
||||
JSCompartment* singletonComp = nullptr;
|
||||
@@ -4099,13 +4099,6 @@ class MOZ_STACK_CLASS Debugger::ScriptQuery
|
||||
bool oom;
|
||||
|
||||
bool addCompartment(JSCompartment* comp) {
|
||||
{
|
||||
// All scripts in the debuggee compartment must be visible, so
|
||||
// delazify everything.
|
||||
AutoCompartment ac(cx, comp);
|
||||
if (!comp->ensureDelazifyScriptsForDebugger(cx))
|
||||
return false;
|
||||
}
|
||||
return compartments.put(comp);
|
||||
}
|
||||
|
||||
@@ -4150,6 +4143,18 @@ class MOZ_STACK_CLASS Debugger::ScriptQuery
|
||||
return true;
|
||||
}
|
||||
|
||||
bool delazifyScripts() {
|
||||
// All scripts in debuggee compartments must be visible, so delazify
|
||||
// everything.
|
||||
for (auto r = compartments.all(); !r.empty(); r.popFront()) {
|
||||
JSCompartment* comp = r.front();
|
||||
AutoCompartment ac(cx, comp);
|
||||
if (!comp->ensureDelazifyScriptsForDebugger(cx))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void considerScript(JSRuntime* rt, void* data, JSScript* script) {
|
||||
ScriptQuery* self = static_cast<ScriptQuery*>(data);
|
||||
self->consider(script);
|
||||
|
||||
@@ -221,9 +221,32 @@ GlobalObject::resolveConstructor(JSContext* cx, Handle<GlobalObject*> global, JS
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the constructor slot here to make it usable from JS_DefineFunctions,
|
||||
// especially with JSProto_Function, as Function.prototype.toString is also
|
||||
// a function.
|
||||
// All failure cases from here should reset them to undefined, to avoid
|
||||
// leaving partially initiallized object in the constructor slot.
|
||||
global->setConstructor(key, ObjectValue(*ctor));
|
||||
global->setConstructorPropertySlot(key, ObjectValue(*ctor));
|
||||
|
||||
if (!defineConstructorPropertiesAndLinkPrototype(cx, global, key, clasp, id,
|
||||
ctor, proto))
|
||||
{
|
||||
global->setConstructor(key, UndefinedValue());
|
||||
global->setConstructorPropertySlot(key, UndefinedValue());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
GlobalObject::defineConstructorPropertiesAndLinkPrototype(JSContext* cx,
|
||||
Handle<GlobalObject*> global,
|
||||
JSProtoKey key, const Class* clasp,
|
||||
HandleId id, HandleObject ctor,
|
||||
HandleObject proto)
|
||||
{
|
||||
// Define any specified functions and properties, unless we're a dependent
|
||||
// standard class (in which case they live on the prototype), or we're
|
||||
// operating on the self-hosting global, in which case we don't want any
|
||||
|
||||
@@ -241,6 +241,12 @@ class GlobalObject : public NativeObject
|
||||
}
|
||||
|
||||
private:
|
||||
static bool defineConstructorPropertiesAndLinkPrototype(JSContext* cx,
|
||||
Handle<GlobalObject*> global,
|
||||
JSProtoKey key, const Class* clasp,
|
||||
HandleId id, HandleObject ctor,
|
||||
HandleObject proto);
|
||||
|
||||
bool arrayClassInitialized() const {
|
||||
return classIsInitialized(JSProto_Array);
|
||||
}
|
||||
|
||||
@@ -454,6 +454,11 @@ StatsCellCallback(JSRuntime* rt, void* data, void* thing, JS::TraceKind traceKin
|
||||
|
||||
cStats.classInfo.add(info);
|
||||
|
||||
if (obj->is<WasmModuleObject>()) {
|
||||
if (ScriptSource* ss = obj->as<WasmModuleObject>().module().maybeScriptSource())
|
||||
CollectScriptSourceStats<granularity>(closure, ss);
|
||||
}
|
||||
|
||||
const Class* clasp = obj->getClass();
|
||||
const char* className = clasp->name;
|
||||
AddClassInfo(granularity, cStats, className, info);
|
||||
@@ -463,11 +468,6 @@ StatsCellCallback(JSRuntime* rt, void* data, void* thing, JS::TraceKind traceKin
|
||||
if (opv->getISupports_(obj, &iface) && iface)
|
||||
cStats.objectsPrivate += opv->sizeOfIncludingThis(iface);
|
||||
}
|
||||
|
||||
if (obj->is<WasmModuleObject>()) {
|
||||
if (ScriptSource* ss = obj->as<WasmModuleObject>().module().maybeScriptSource())
|
||||
CollectScriptSourceStats<granularity>(closure, ss);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1350,11 +1350,13 @@ js::NativeDefineProperty(ExclusiveContext* cx, HandleNativeObject obj, HandleId
|
||||
// redefined, it will.
|
||||
if ((desc_.attributes() & JSPROP_RESOLVING) == 0)
|
||||
obj->as<ArgumentsObject>().markLengthOverridden();
|
||||
}
|
||||
if (JSID_IS_SYMBOL(id) && JSID_TO_SYMBOL(id) == cx->wellKnownSymbols().iterator) {
|
||||
} else if (JSID_IS_SYMBOL(id) && JSID_TO_SYMBOL(id) == cx->wellKnownSymbols().iterator) {
|
||||
// Do same thing as .length for [@@iterator].
|
||||
if ((desc_.attributes() & JSPROP_RESOLVING) == 0)
|
||||
obj->as<ArgumentsObject>().markIteratorOverridden();
|
||||
} else if (JSID_IS_INT(id)) {
|
||||
if ((desc_.attributes() & JSPROP_RESOLVING) == 0)
|
||||
obj->as<ArgumentsObject>().markElementOverridden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -385,9 +385,6 @@ js::InitSharedArrayBufferClass(JSContext* cx, HandleObject obj)
|
||||
if (!ctor)
|
||||
return nullptr;
|
||||
|
||||
if (!GlobalObject::initBuiltinConstructor(cx, global, JSProto_SharedArrayBuffer, ctor, proto))
|
||||
return nullptr;
|
||||
|
||||
if (!LinkConstructorAndPrototype(cx, ctor, proto))
|
||||
return nullptr;
|
||||
|
||||
@@ -408,6 +405,9 @@ js::InitSharedArrayBufferClass(JSContext* cx, HandleObject obj)
|
||||
if (!JS_DefineFunctions(cx, proto, SharedArrayBufferObject::jsfuncs))
|
||||
return nullptr;
|
||||
|
||||
if (!GlobalObject::initBuiltinConstructor(cx, global, JSProto_SharedArrayBuffer, ctor, proto))
|
||||
return nullptr;
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
|
||||
@@ -378,14 +378,14 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!pointerMap.add(p, text, payload))
|
||||
return nullptr;
|
||||
|
||||
if (graph.get())
|
||||
graph->addTextId(textId, str);
|
||||
|
||||
nextTextId++;
|
||||
|
||||
if (!pointerMap.add(p, text, payload))
|
||||
return nullptr;
|
||||
|
||||
return payload;
|
||||
}
|
||||
|
||||
@@ -440,14 +440,14 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!pointerMap.add(p, ptr, payload))
|
||||
return nullptr;
|
||||
|
||||
if (graph.get())
|
||||
graph->addTextId(textId, str);
|
||||
|
||||
nextTextId++;
|
||||
|
||||
if (!pointerMap.add(p, ptr, payload))
|
||||
return nullptr;
|
||||
|
||||
return payload;
|
||||
}
|
||||
|
||||
|
||||
@@ -637,9 +637,17 @@ class TypedArrayObjectTemplate : public TypedArrayObject
|
||||
}
|
||||
|
||||
static bool
|
||||
maybeCreateArrayBuffer(JSContext* cx, uint32_t byteLength, HandleObject nonDefaultProto,
|
||||
maybeCreateArrayBuffer(JSContext* cx, uint32_t count, uint32_t unit,
|
||||
HandleObject nonDefaultProto,
|
||||
MutableHandle<ArrayBufferObject*> buffer)
|
||||
{
|
||||
if (count >= INT32_MAX / unit) {
|
||||
JS_ReportErrorNumber(cx, GetErrorMessage, nullptr,
|
||||
JSMSG_NEED_DIET, "size and count");
|
||||
return false;
|
||||
}
|
||||
uint32_t byteLength = count * unit;
|
||||
|
||||
MOZ_ASSERT(byteLength < INT32_MAX);
|
||||
static_assert(INLINE_BUFFER_LIMIT % sizeof(NativeType) == 0,
|
||||
"ArrayBuffer inline storage shouldn't waste any space");
|
||||
@@ -664,20 +672,16 @@ class TypedArrayObjectTemplate : public TypedArrayObject
|
||||
if (!GetPrototypeForInstance(cx, newTarget, &proto))
|
||||
return nullptr;
|
||||
|
||||
if (nelements >= INT32_MAX / BYTES_PER_ELEMENT) {
|
||||
JS_ReportErrorNumber(cx, GetErrorMessage, nullptr,
|
||||
JSMSG_NEED_DIET, "size and count");
|
||||
return nullptr;
|
||||
}
|
||||
Rooted<ArrayBufferObject*> buffer(cx);
|
||||
if (!maybeCreateArrayBuffer(cx, nelements * BYTES_PER_ELEMENT, nullptr, &buffer))
|
||||
if (!maybeCreateArrayBuffer(cx, nelements, BYTES_PER_ELEMENT, nullptr, &buffer))
|
||||
return nullptr;
|
||||
|
||||
return makeInstance(cx, buffer, 0, nelements, proto);
|
||||
}
|
||||
|
||||
static bool
|
||||
AllocateArrayBuffer(JSContext* cx, HandleValue ctor, uint32_t byteLength,
|
||||
AllocateArrayBuffer(JSContext* cx, HandleValue ctor,
|
||||
uint32_t count, uint32_t unit,
|
||||
MutableHandle<ArrayBufferObject*> buffer);
|
||||
|
||||
static bool
|
||||
@@ -731,10 +735,11 @@ struct TypedArrayObject::OfType
|
||||
};
|
||||
|
||||
// ES 2016 draft Mar 25, 2016 24.1.1.1.
|
||||
// byteLength = count * unit
|
||||
template<typename T>
|
||||
/* static */ bool
|
||||
TypedArrayObjectTemplate<T>::AllocateArrayBuffer(JSContext* cx, HandleValue ctor,
|
||||
uint32_t byteLength,
|
||||
uint32_t count, uint32_t unit,
|
||||
MutableHandle<ArrayBufferObject*> buffer)
|
||||
{
|
||||
// ES 2016 draft Mar 25, 2016 24.1.1.1 step 1 (partially).
|
||||
@@ -750,14 +755,8 @@ TypedArrayObjectTemplate<T>::AllocateArrayBuffer(JSContext* cx, HandleValue ctor
|
||||
if (proto == arrayBufferProto)
|
||||
proto = nullptr;
|
||||
|
||||
if (byteLength >= INT32_MAX) {
|
||||
JS_ReportErrorNumber(cx, GetErrorMessage, nullptr,
|
||||
JSMSG_NEED_DIET, "size and count");
|
||||
return false;
|
||||
}
|
||||
|
||||
// ES 2016 draft Mar 25, 2016 24.1.1.1 steps 1 (remaining part), 2-6.
|
||||
if (!maybeCreateArrayBuffer(cx, byteLength, proto, buffer))
|
||||
if (!maybeCreateArrayBuffer(cx, count, unit, proto, buffer))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -848,7 +847,7 @@ TypedArrayObjectTemplate<T>::CloneArrayBufferNoCopy(JSContext* cx,
|
||||
// Steps 3-4 (skipped).
|
||||
|
||||
// Steps 5.
|
||||
if (!AllocateArrayBuffer(cx, cloneCtor, srcLength, buffer))
|
||||
if (!AllocateArrayBuffer(cx, cloneCtor, srcLength, 1, buffer))
|
||||
return false;
|
||||
|
||||
// Step 6.
|
||||
@@ -938,9 +937,6 @@ TypedArrayObjectTemplate<T>::fromTypedArray(JSContext* cx, HandleObject other, b
|
||||
// Step 14.
|
||||
uint32_t srcByteOffset = srcArray->byteOffset();
|
||||
|
||||
// Steps 15-16.
|
||||
uint32_t byteLength = BYTES_PER_ELEMENT * elementLength;
|
||||
|
||||
// Steps 8-9, 17.
|
||||
Rooted<ArrayBufferObject*> buffer(cx);
|
||||
if (ArrayTypeID() == srcType) {
|
||||
@@ -956,8 +952,8 @@ TypedArrayObjectTemplate<T>::fromTypedArray(JSContext* cx, HandleObject other, b
|
||||
if (!GetSpeciesConstructor(cx, srcData, isWrapped, &bufferCtor))
|
||||
return nullptr;
|
||||
|
||||
// Step 18.b.
|
||||
if (!AllocateArrayBuffer(cx, bufferCtor, byteLength, &buffer))
|
||||
// Step 15-16, 18.b.
|
||||
if (!AllocateArrayBuffer(cx, bufferCtor, elementLength, BYTES_PER_ELEMENT, &buffer))
|
||||
return nullptr;
|
||||
|
||||
// Step 18.c.
|
||||
@@ -994,12 +990,7 @@ TypedArrayObjectTemplate<T>::fromObject(JSContext* cx, HandleObject other, Handl
|
||||
return nullptr;
|
||||
if (!GetPrototypeForInstance(cx, newTarget, &proto))
|
||||
return nullptr;
|
||||
if (len >= INT32_MAX / BYTES_PER_ELEMENT) {
|
||||
JS_ReportErrorNumber(cx, GetErrorMessage, nullptr,
|
||||
JSMSG_NEED_DIET, "size and count");
|
||||
return nullptr;
|
||||
}
|
||||
if (!maybeCreateArrayBuffer(cx, len * BYTES_PER_ELEMENT, nullptr, &buffer))
|
||||
if (!maybeCreateArrayBuffer(cx, len, BYTES_PER_ELEMENT, nullptr, &buffer))
|
||||
return nullptr;
|
||||
|
||||
Rooted<TypedArrayObject*> obj(cx, makeInstance(cx, buffer, 0, len, proto));
|
||||
|
||||
@@ -31,14 +31,26 @@ BackEdge::clone() const
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
static void
|
||||
dumpNode(const JS::ubi::Node& node)
|
||||
{
|
||||
fprintf(stderr, " %p ", (void*) node.identifier());
|
||||
js_fputs(node.typeName(), stderr);
|
||||
if (node.coarseType() == JS::ubi::CoarseType::Object) {
|
||||
if (const char* clsName = node.jsObjectClassName())
|
||||
fprintf(stderr, " [object %s]", clsName);
|
||||
}
|
||||
fputc('\n', stderr);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(void)
|
||||
dumpPaths(JSRuntime* rt, Node node, uint32_t maxNumPaths /* = 10 */)
|
||||
{
|
||||
mozilla::Maybe<AutoCheckCannotGC> nogc;
|
||||
|
||||
JS::ubi::RootList rootList(rt, nogc);
|
||||
JS::ubi::RootList rootList(rt, nogc, true);
|
||||
MOZ_ASSERT(rootList.init());
|
||||
rootList.wantNames = true;
|
||||
|
||||
NodeSet targets;
|
||||
bool ok = targets.init() && targets.putNew(node);
|
||||
@@ -51,11 +63,7 @@ dumpPaths(JSRuntime* rt, Node node, uint32_t maxNumPaths /* = 10 */)
|
||||
ok = paths->forEachPath(node, [&](Path& path) {
|
||||
fprintf(stderr, "Path %d:\n", i++);
|
||||
for (auto backEdge : path) {
|
||||
fprintf(stderr, " %p ", (void*) backEdge->predecessor().identifier());
|
||||
|
||||
js_fputs(backEdge->predecessor().typeName(), stderr);
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
dumpNode(backEdge->predecessor());
|
||||
fprintf(stderr, " |\n");
|
||||
fprintf(stderr, " |\n");
|
||||
fprintf(stderr, " '");
|
||||
@@ -70,10 +78,8 @@ dumpPaths(JSRuntime* rt, Node node, uint32_t maxNumPaths /* = 10 */)
|
||||
fprintf(stderr, " V\n");
|
||||
}
|
||||
|
||||
fprintf(stderr, " %p ", (void*) node.identifier());
|
||||
js_fputs(node.typeName(), stderr);
|
||||
fprintf(stderr, "\n\n");
|
||||
|
||||
dumpNode(node);
|
||||
fputc('\n', stderr);
|
||||
return true;
|
||||
});
|
||||
MOZ_ASSERT(ok);
|
||||
|
||||
@@ -164,21 +164,16 @@ Native2WrappedNativeMap::newMap(int length)
|
||||
}
|
||||
|
||||
Native2WrappedNativeMap::Native2WrappedNativeMap(int length)
|
||||
: mTable(new PLDHashTable(PLDHashTable::StubOps(), sizeof(Entry), length))
|
||||
: mTable(PLDHashTable::StubOps(), sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
Native2WrappedNativeMap::~Native2WrappedNativeMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
size_t
|
||||
Native2WrappedNativeMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
size_t n = mallocSizeOf(this);
|
||||
n += mTable->ShallowSizeOfIncludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable->Iter(); !iter.Done(); iter.Next()) {
|
||||
n += mTable.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable.ConstIter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<Native2WrappedNativeMap::Entry*>(iter.Get());
|
||||
n += mallocSizeOf(entry->value);
|
||||
}
|
||||
@@ -204,15 +199,10 @@ IID2WrappedJSClassMap::newMap(int length)
|
||||
}
|
||||
|
||||
IID2WrappedJSClassMap::IID2WrappedJSClassMap(int length)
|
||||
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
|
||||
: mTable(&Entry::sOps, sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
IID2WrappedJSClassMap::~IID2WrappedJSClassMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
// implement IID2NativeInterfaceMap...
|
||||
|
||||
@@ -232,21 +222,16 @@ IID2NativeInterfaceMap::newMap(int length)
|
||||
}
|
||||
|
||||
IID2NativeInterfaceMap::IID2NativeInterfaceMap(int length)
|
||||
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
|
||||
: mTable(&Entry::sOps, sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
IID2NativeInterfaceMap::~IID2NativeInterfaceMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
size_t
|
||||
IID2NativeInterfaceMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
size_t n = mallocSizeOf(this);
|
||||
n += mTable->ShallowSizeOfIncludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable->Iter(); !iter.Done(); iter.Next()) {
|
||||
n += mTable.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable.ConstIter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<IID2NativeInterfaceMap::Entry*>(iter.Get());
|
||||
n += entry->value->SizeOfIncludingThis(mallocSizeOf);
|
||||
}
|
||||
@@ -264,20 +249,15 @@ ClassInfo2NativeSetMap::newMap(int length)
|
||||
}
|
||||
|
||||
ClassInfo2NativeSetMap::ClassInfo2NativeSetMap(int length)
|
||||
: mTable(new PLDHashTable(PLDHashTable::StubOps(), sizeof(Entry), length))
|
||||
: mTable(PLDHashTable::StubOps(), sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
ClassInfo2NativeSetMap::~ClassInfo2NativeSetMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
size_t
|
||||
ClassInfo2NativeSetMap::ShallowSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf)
|
||||
{
|
||||
size_t n = mallocSizeOf(this);
|
||||
n += mTable->ShallowSizeOfIncludingThis(mallocSizeOf);
|
||||
n += mTable.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
return n;
|
||||
}
|
||||
|
||||
@@ -292,21 +272,16 @@ ClassInfo2WrappedNativeProtoMap::newMap(int length)
|
||||
}
|
||||
|
||||
ClassInfo2WrappedNativeProtoMap::ClassInfo2WrappedNativeProtoMap(int length)
|
||||
: mTable(new PLDHashTable(PLDHashTable::StubOps(), sizeof(Entry), length))
|
||||
: mTable(PLDHashTable::StubOps(), sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
ClassInfo2WrappedNativeProtoMap::~ClassInfo2WrappedNativeProtoMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
size_t
|
||||
ClassInfo2WrappedNativeProtoMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
size_t n = mallocSizeOf(this);
|
||||
n += mTable->ShallowSizeOfIncludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable->Iter(); !iter.Done(); iter.Next()) {
|
||||
n += mTable.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable.ConstIter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<ClassInfo2WrappedNativeProtoMap::Entry*>(iter.Get());
|
||||
n += mallocSizeOf(entry->value);
|
||||
}
|
||||
@@ -402,21 +377,16 @@ NativeSetMap::newMap(int length)
|
||||
}
|
||||
|
||||
NativeSetMap::NativeSetMap(int length)
|
||||
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
|
||||
: mTable(&Entry::sOps, sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
NativeSetMap::~NativeSetMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
size_t
|
||||
NativeSetMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
size_t n = mallocSizeOf(this);
|
||||
n += mTable->ShallowSizeOfIncludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable->Iter(); !iter.Done(); iter.Next()) {
|
||||
n += mTable.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
for (auto iter = mTable.ConstIter(); !iter.Done(); iter.Next()) {
|
||||
auto entry = static_cast<NativeSetMap::Entry*>(iter.Get());
|
||||
n += entry->key_value->SizeOfIncludingThis(mallocSizeOf);
|
||||
}
|
||||
@@ -456,15 +426,10 @@ IID2ThisTranslatorMap::newMap(int length)
|
||||
}
|
||||
|
||||
IID2ThisTranslatorMap::IID2ThisTranslatorMap(int length)
|
||||
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
|
||||
: mTable(&Entry::sOps, sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
IID2ThisTranslatorMap::~IID2ThisTranslatorMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
PLDHashNumber
|
||||
@@ -526,15 +491,10 @@ XPCNativeScriptableSharedMap::newMap(int length)
|
||||
}
|
||||
|
||||
XPCNativeScriptableSharedMap::XPCNativeScriptableSharedMap(int length)
|
||||
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
|
||||
: mTable(&Entry::sOps, sizeof(Entry), length)
|
||||
{
|
||||
}
|
||||
|
||||
XPCNativeScriptableSharedMap::~XPCNativeScriptableSharedMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
bool
|
||||
XPCNativeScriptableSharedMap::GetNewOrUsed(uint32_t flags,
|
||||
char* name,
|
||||
@@ -544,7 +504,7 @@ XPCNativeScriptableSharedMap::GetNewOrUsed(uint32_t flags,
|
||||
NS_PRECONDITION(si,"bad param");
|
||||
|
||||
XPCNativeScriptableShared key(flags, name, /* populate = */ false);
|
||||
auto entry = static_cast<Entry*>(mTable->Add(&key, fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(&key, fallible));
|
||||
if (!entry)
|
||||
return false;
|
||||
|
||||
@@ -579,14 +539,8 @@ XPCWrappedNativeProtoMap::newMap(int length)
|
||||
}
|
||||
|
||||
XPCWrappedNativeProtoMap::XPCWrappedNativeProtoMap(int length)
|
||||
: mTable(new PLDHashTable(PLDHashTable::StubOps(), sizeof(PLDHashEntryStub),
|
||||
length))
|
||||
: mTable(PLDHashTable::StubOps(), sizeof(PLDHashEntryStub), length)
|
||||
{
|
||||
}
|
||||
|
||||
XPCWrappedNativeProtoMap::~XPCWrappedNativeProtoMap()
|
||||
{
|
||||
delete mTable;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
+52
-61
@@ -115,7 +115,7 @@ public:
|
||||
inline XPCWrappedNative* Find(nsISupports* Obj)
|
||||
{
|
||||
NS_PRECONDITION(Obj,"bad param");
|
||||
auto entry = static_cast<Entry*>(mTable->Search(Obj));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(Obj));
|
||||
return entry ? entry->value : nullptr;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
NS_PRECONDITION(wrapper,"bad param");
|
||||
nsISupports* obj = wrapper->GetIdentityObject();
|
||||
MOZ_ASSERT(!Find(obj), "wrapper already in new scope!");
|
||||
auto entry = static_cast<Entry*>(mTable->Add(obj, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(obj, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key)
|
||||
@@ -144,21 +144,21 @@ public:
|
||||
"nsISupports identity! This will most likely cause serious "
|
||||
"problems!");
|
||||
#endif
|
||||
mTable->Remove(wrapper->GetIdentityObject());
|
||||
mTable.Remove(wrapper->GetIdentityObject());
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() const { return PLDHashTable::Iterator(mTable); }
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
~Native2WrappedNativeMap();
|
||||
private:
|
||||
Native2WrappedNativeMap(); // no implementation
|
||||
explicit Native2WrappedNativeMap(int size);
|
||||
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/*************************/
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
|
||||
inline nsXPCWrappedJSClass* Find(REFNSIID iid)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Search(&iid));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(&iid));
|
||||
return entry ? entry->value : nullptr;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
{
|
||||
NS_PRECONDITION(clazz,"bad param");
|
||||
const nsIID* iid = &clazz->GetIID();
|
||||
auto entry = static_cast<Entry*>(mTable->Add(iid, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(iid, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key)
|
||||
@@ -199,19 +199,20 @@ public:
|
||||
inline void Remove(nsXPCWrappedJSClass* clazz)
|
||||
{
|
||||
NS_PRECONDITION(clazz,"bad param");
|
||||
mTable->Remove(&clazz->GetIID());
|
||||
mTable.Remove(&clazz->GetIID());
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() const { return PLDHashTable::Iterator(mTable); }
|
||||
#ifdef DEBUG
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
#endif
|
||||
|
||||
~IID2WrappedJSClassMap();
|
||||
private:
|
||||
IID2WrappedJSClassMap(); // no implementation
|
||||
explicit IID2WrappedJSClassMap(int size);
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/*************************/
|
||||
@@ -231,7 +232,7 @@ public:
|
||||
|
||||
inline XPCNativeInterface* Find(REFNSIID iid)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Search(&iid));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(&iid));
|
||||
return entry ? entry->value : nullptr;
|
||||
}
|
||||
|
||||
@@ -239,7 +240,7 @@ public:
|
||||
{
|
||||
NS_PRECONDITION(iface,"bad param");
|
||||
const nsIID* iid = iface->GetIID();
|
||||
auto entry = static_cast<Entry*>(mTable->Add(iid, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(iid, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key)
|
||||
@@ -252,22 +253,21 @@ public:
|
||||
inline void Remove(XPCNativeInterface* iface)
|
||||
{
|
||||
NS_PRECONDITION(iface,"bad param");
|
||||
mTable->Remove(iface->GetIID());
|
||||
mTable.Remove(iface->GetIID());
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
~IID2NativeInterfaceMap();
|
||||
private:
|
||||
IID2NativeInterfaceMap(); // no implementation
|
||||
explicit IID2NativeInterfaceMap(int size);
|
||||
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/*************************/
|
||||
@@ -285,14 +285,14 @@ public:
|
||||
|
||||
inline XPCNativeSet* Find(nsIClassInfo* info)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Search(info));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(info));
|
||||
return entry ? entry->value : nullptr;
|
||||
}
|
||||
|
||||
inline XPCNativeSet* Add(nsIClassInfo* info, XPCNativeSet* set)
|
||||
{
|
||||
NS_PRECONDITION(info,"bad param");
|
||||
auto entry = static_cast<Entry*>(mTable->Add(info, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(info, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key)
|
||||
@@ -305,12 +305,12 @@ public:
|
||||
inline void Remove(nsIClassInfo* info)
|
||||
{
|
||||
NS_PRECONDITION(info,"bad param");
|
||||
mTable->Remove(info);
|
||||
mTable.Remove(info);
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
// ClassInfo2NativeSetMap holds pointers to *some* XPCNativeSets.
|
||||
// So we don't want to count those XPCNativeSets, because they are better
|
||||
@@ -318,12 +318,11 @@ public:
|
||||
// pointers to *all* XPCNativeSets). Hence the "Shallow".
|
||||
size_t ShallowSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf);
|
||||
|
||||
~ClassInfo2NativeSetMap();
|
||||
private:
|
||||
ClassInfo2NativeSetMap(); // no implementation
|
||||
explicit ClassInfo2NativeSetMap(int size);
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/*************************/
|
||||
@@ -341,14 +340,14 @@ public:
|
||||
|
||||
inline XPCWrappedNativeProto* Find(nsIClassInfo* info)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Search(info));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(info));
|
||||
return entry ? entry->value : nullptr;
|
||||
}
|
||||
|
||||
inline XPCWrappedNativeProto* Add(nsIClassInfo* info, XPCWrappedNativeProto* proto)
|
||||
{
|
||||
NS_PRECONDITION(info,"bad param");
|
||||
auto entry = static_cast<Entry*>(mTable->Add(info, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(info, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key)
|
||||
@@ -361,23 +360,21 @@ public:
|
||||
inline void Remove(nsIClassInfo* info)
|
||||
{
|
||||
NS_PRECONDITION(info,"bad param");
|
||||
mTable->Remove(info);
|
||||
mTable.Remove(info);
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() const { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
~ClassInfo2WrappedNativeProtoMap();
|
||||
private:
|
||||
ClassInfo2WrappedNativeProtoMap(); // no implementation
|
||||
explicit ClassInfo2WrappedNativeProtoMap(int size);
|
||||
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/*************************/
|
||||
@@ -399,7 +396,7 @@ public:
|
||||
|
||||
inline XPCNativeSet* Find(XPCNativeSetKey* key)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Search(key));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(key));
|
||||
return entry ? entry->key_value : nullptr;
|
||||
}
|
||||
|
||||
@@ -407,7 +404,7 @@ public:
|
||||
{
|
||||
NS_PRECONDITION(key,"bad param");
|
||||
NS_PRECONDITION(set,"bad param");
|
||||
auto entry = static_cast<Entry*>(mTable->Add(key, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(key, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key_value)
|
||||
@@ -427,23 +424,21 @@ public:
|
||||
NS_PRECONDITION(set,"bad param");
|
||||
|
||||
XPCNativeSetKey key(set, nullptr, 0);
|
||||
mTable->Remove(&key);
|
||||
mTable.Remove(&key);
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() const { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
~NativeSetMap();
|
||||
private:
|
||||
NativeSetMap(); // no implementation
|
||||
explicit NativeSetMap(int size);
|
||||
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
@@ -469,14 +464,14 @@ public:
|
||||
|
||||
inline nsIXPCFunctionThisTranslator* Find(REFNSIID iid)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Search(&iid));
|
||||
auto entry = static_cast<Entry*>(mTable.Search(&iid));
|
||||
return entry ? entry->value : nullptr;
|
||||
}
|
||||
|
||||
inline nsIXPCFunctionThisTranslator* Add(REFNSIID iid,
|
||||
nsIXPCFunctionThisTranslator* obj)
|
||||
{
|
||||
auto entry = static_cast<Entry*>(mTable->Add(&iid, mozilla::fallible));
|
||||
auto entry = static_cast<Entry*>(mTable.Add(&iid, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
entry->value = obj;
|
||||
@@ -486,17 +481,16 @@ public:
|
||||
|
||||
inline void Remove(REFNSIID iid)
|
||||
{
|
||||
mTable->Remove(&iid);
|
||||
mTable.Remove(&iid);
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
~IID2ThisTranslatorMap();
|
||||
private:
|
||||
IID2ThisTranslatorMap(); // no implementation
|
||||
explicit IID2ThisTranslatorMap(int size);
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
@@ -521,16 +515,15 @@ public:
|
||||
|
||||
bool GetNewOrUsed(uint32_t flags, char* name, XPCNativeScriptableInfo* si);
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
~XPCNativeScriptableSharedMap();
|
||||
private:
|
||||
XPCNativeScriptableSharedMap(); // no implementation
|
||||
explicit XPCNativeScriptableSharedMap(int size);
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
@@ -546,7 +539,7 @@ public:
|
||||
{
|
||||
NS_PRECONDITION(proto,"bad param");
|
||||
auto entry = static_cast<PLDHashEntryStub*>
|
||||
(mTable->Add(proto, mozilla::fallible));
|
||||
(mTable.Add(proto, mozilla::fallible));
|
||||
if (!entry)
|
||||
return nullptr;
|
||||
if (entry->key)
|
||||
@@ -558,20 +551,18 @@ public:
|
||||
inline void Remove(XPCWrappedNativeProto* proto)
|
||||
{
|
||||
NS_PRECONDITION(proto,"bad param");
|
||||
mTable->Remove(proto);
|
||||
mTable.Remove(proto);
|
||||
}
|
||||
|
||||
inline uint32_t Count() { return mTable->EntryCount(); }
|
||||
inline uint32_t Count() { return mTable.EntryCount(); }
|
||||
|
||||
PLDHashTable::Iterator Iter() const { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return PLDHashTable::Iterator(mTable); }
|
||||
PLDHashTable::Iterator Iter() { return mTable.Iter(); }
|
||||
|
||||
~XPCWrappedNativeProtoMap();
|
||||
private:
|
||||
XPCWrappedNativeProtoMap(); // no implementation
|
||||
explicit XPCWrappedNativeProtoMap(int size);
|
||||
private:
|
||||
PLDHashTable* mTable;
|
||||
PLDHashTable mTable;
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
@@ -5,48 +5,14 @@
|
||||
|
||||
_DEST_DIR = $(DEPTH)/_tests/reftest
|
||||
|
||||
_HARNESS_FILES = \
|
||||
$(srcdir)/runreftest.py \
|
||||
$(srcdir)/reftestcommandline.py \
|
||||
$(srcdir)/remotereftest.py \
|
||||
$(srcdir)/runreftestb2g.py \
|
||||
$(srcdir)/runreftestmulet.py \
|
||||
$(srcdir)/gaia_lock_screen.js \
|
||||
$(srcdir)/output.py \
|
||||
automation.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanager.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/droid.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/version_codes.py \
|
||||
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/Zeroconf.py \
|
||||
$(topsrcdir)/testing/mozbase/moznetwork/moznetwork/moznetwork.py \
|
||||
$(topsrcdir)/build/mobile/b2gautomation.py \
|
||||
$(topsrcdir)/build/mobile/remoteautomation.py \
|
||||
$(topsrcdir)/testing/mochitest/server.js \
|
||||
$(topsrcdir)/build/pgo/server-locations.txt \
|
||||
$(NULL)
|
||||
|
||||
_HARNESS_PP_FILES = \
|
||||
b2g_start_script.js \
|
||||
$(NULL)
|
||||
_HARNESS_PP_FILES_PATH = $(_DEST_DIR)
|
||||
PP_TARGETS += _HARNESS_PP_FILES
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# We're installing to _tests/reftest
|
||||
TARGET_DEPTH = ../..
|
||||
include $(topsrcdir)/build/automation-build.mk
|
||||
|
||||
$(_DEST_DIR):
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
$(_HARNESS_FILES): $(_DEST_DIR)
|
||||
|
||||
# copy harness and the reftest extension bits to $(_DEST_DIR)
|
||||
# This needs to happen after jar.mn handling from rules.mk included above.
|
||||
# The order of the :: rules ensures that.
|
||||
libs:: $(_HARNESS_FILES) $(addprefix $(_DEST_DIR)/,$(_HARNESS_PP_FILES))
|
||||
$(INSTALL) $(_HARNESS_FILES) $(_DEST_DIR)
|
||||
libs::
|
||||
(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - reftest) | (cd $(_DEST_DIR) && tar -xf -)
|
||||
|
||||
@@ -7,23 +7,26 @@
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Testing', 'Reftest')
|
||||
|
||||
if CONFIG['MOZ_BUILD_APP'] in ('b2g', 'b2g/dev', 'mobile/android'):
|
||||
DEFINES['BOOTSTRAP'] = True
|
||||
if CONFIG['MOZ_BUILD_APP'] in ('b2g', 'b2g/dev'):
|
||||
DEFINES['REFTEST_B2G'] = True
|
||||
else:
|
||||
EXTRA_PP_COMPONENTS += [
|
||||
'reftest-cmdline.js',
|
||||
'reftest-cmdline.manifest',
|
||||
]
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
||||
USE_EXTENSION_MANIFEST = True
|
||||
|
||||
XPI_NAME = 'reftest'
|
||||
|
||||
USE_EXTENSION_MANIFEST = True
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
FINAL_TARGET_PP_FILES += ['install.rdf']
|
||||
FINAL_TARGET_FILES += ['bootstrap.js']
|
||||
|
||||
if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':
|
||||
FINAL_TARGET_PP_FILES += ['bootstrap.js']
|
||||
GENERATED_FILES += ['automation.py']
|
||||
TEST_HARNESS_FILES.reftest += [
|
||||
'!automation.py',
|
||||
'/build/mobile/b2gautomation.py',
|
||||
'/build/mobile/remoteautomation.py',
|
||||
'/build/pgo/server-locations.txt',
|
||||
'/testing/mochitest/server.js',
|
||||
'b2g_start_script.js',
|
||||
'gaia_lock_screen.js',
|
||||
'output.py',
|
||||
'reftest-preferences.js',
|
||||
'reftestcommandline.py',
|
||||
'remotereftest.py',
|
||||
'runreftest.py',
|
||||
'runreftestb2g.py',
|
||||
'runreftestmulet.py',
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This directory contains files used in gecko builds from FFmpeg
|
||||
(http://ffmpeg.org). The current files are from FFmpeg as of
|
||||
revision n3.0-1-g0aa2fbd
|
||||
revision n3.0.2
|
||||
All source files match their path from the library's source archive.
|
||||
|
||||
Currently, we only use the vp8 and vp9 portion of the library, and only on x86
|
||||
|
||||
@@ -401,10 +401,12 @@ int av_packet_split_side_data(AVPacket *pkt){
|
||||
p = pkt->data + pkt->size - 8 - 5;
|
||||
for (i=1; ; i++){
|
||||
size = AV_RB32(p);
|
||||
if (size>INT_MAX || p - pkt->data < size)
|
||||
if (size>INT_MAX - 5 || p - pkt->data < size)
|
||||
return 0;
|
||||
if (p[4]&128)
|
||||
break;
|
||||
if (p - pkt->data < size + 5)
|
||||
return 0;
|
||||
p-= size+5;
|
||||
}
|
||||
|
||||
@@ -415,7 +417,7 @@ int av_packet_split_side_data(AVPacket *pkt){
|
||||
p= pkt->data + pkt->size - 8 - 5;
|
||||
for (i=0; ; i++){
|
||||
size= AV_RB32(p);
|
||||
av_assert0(size<=INT_MAX && p - pkt->data >= size);
|
||||
av_assert0(size<=INT_MAX - 5 && p - pkt->data >= size);
|
||||
pkt->side_data[i].data = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
pkt->side_data[i].size = size;
|
||||
pkt->side_data[i].type = p[4]&127;
|
||||
|
||||
@@ -291,12 +291,6 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
|
||||
short *output_bak = NULL;
|
||||
int lenout;
|
||||
|
||||
if (s->input_channels == s->output_channels && s->ratio == 1.0 && 0) {
|
||||
/* nothing to do */
|
||||
memcpy(output, input, nb_samples * s->input_channels * sizeof(short));
|
||||
return nb_samples;
|
||||
}
|
||||
|
||||
if (s->sample_fmt[0] != AV_SAMPLE_FMT_S16) {
|
||||
int istride[1] = { s->sample_size[0] };
|
||||
int ostride[1] = { 2 };
|
||||
|
||||
@@ -94,7 +94,7 @@ static const struct {
|
||||
{ "6.0(front)", 6, AV_CH_LAYOUT_6POINT0_FRONT },
|
||||
{ "hexagonal", 6, AV_CH_LAYOUT_HEXAGONAL },
|
||||
{ "6.1", 7, AV_CH_LAYOUT_6POINT1 },
|
||||
{ "6.1", 7, AV_CH_LAYOUT_6POINT1_BACK },
|
||||
{ "6.1(back)", 7, AV_CH_LAYOUT_6POINT1_BACK },
|
||||
{ "6.1(front)", 7, AV_CH_LAYOUT_6POINT1_FRONT },
|
||||
{ "7.0", 7, AV_CH_LAYOUT_7POINT0 },
|
||||
{ "7.0(front)", 7, AV_CH_LAYOUT_7POINT0_FRONT },
|
||||
|
||||
@@ -41,6 +41,16 @@
|
||||
b_add = FIX(1.77200*255.0/224.0) * cb + ONE_HALF;\
|
||||
}
|
||||
|
||||
#define YUV_TO_RGB1_CCIR_BT709(cb1, cr1)\
|
||||
{\
|
||||
cb = (cb1) - 128;\
|
||||
cr = (cr1) - 128;\
|
||||
r_add = FIX(1.5747*255.0/224.0) * cr + ONE_HALF;\
|
||||
g_add = - FIX(0.1873*255.0/224.0) * cb - FIX(0.4682*255.0/224.0) * cr + \
|
||||
ONE_HALF;\
|
||||
b_add = FIX(1.8556*255.0/224.0) * cb + ONE_HALF;\
|
||||
}
|
||||
|
||||
#define YUV_TO_RGB2_CCIR(r, g, b, y1)\
|
||||
{\
|
||||
y = ((y1) - 16) * FIX(255.0/219.0);\
|
||||
|
||||
@@ -313,6 +313,22 @@ static av_always_inline float ff_exp10f(float x)
|
||||
return exp2f(M_LOG2_10 * x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute x^y for floating point x, y. Note: this function is faster than the
|
||||
* libm variant due to mainly 2 reasons:
|
||||
* 1. It does not handle any edge cases. In particular, this is only guaranteed
|
||||
* to work correctly for x > 0.
|
||||
* 2. It is not as accurate as a standard nearly "correctly rounded" libm variant.
|
||||
* @param x base
|
||||
* @param y exponent
|
||||
* @return x^y
|
||||
*/
|
||||
static av_always_inline float ff_fast_powf(float x, float y)
|
||||
{
|
||||
return expf(logf(x) * y);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A wrapper for open() setting O_CLOEXEC.
|
||||
*/
|
||||
|
||||
@@ -2275,6 +2275,7 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
|
||||
#define FF_COLOR_GRAY 1 /**< gray color space */
|
||||
#define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
|
||||
#define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
|
||||
#define FF_COLOR_XYZ 4
|
||||
|
||||
#define pixdesc_has_alpha(pixdesc) \
|
||||
((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
|
||||
@@ -2290,6 +2291,9 @@ static int get_color_type(const AVPixFmtDescriptor *desc) {
|
||||
if(desc->name && !strncmp(desc->name, "yuvj", 4))
|
||||
return FF_COLOR_YUV_JPEG;
|
||||
|
||||
if(desc->name && !strncmp(desc->name, "xyz", 3))
|
||||
return FF_COLOR_XYZ;
|
||||
|
||||
if(desc->flags & AV_PIX_FMT_FLAG_RGB)
|
||||
return FF_COLOR_RGB;
|
||||
|
||||
|
||||
+29
-8
@@ -1422,17 +1422,16 @@ case "$target" in
|
||||
# the same thing as C4244, we disable C4267, too.
|
||||
# MSVC warning C4345 warns of newly conformant behavior as of VS2003.
|
||||
# MSVC warning C4351 warns of newly conformant behavior as of VS2005.
|
||||
# MSVC warning C4482 warns when an enum value is refered specifing the
|
||||
# name of the enum itself. This behavior is allowed in C++11, and the
|
||||
# warning has been removed in VS2012.
|
||||
# MSVC warning C4800 warns when a value is implicitly cast to bool,
|
||||
# because this also forces narrowing to a single byte, which can be a
|
||||
# perf hit. But this matters so little in practice (and often we want
|
||||
# that behavior) that it's better to turn it off.
|
||||
# MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign)
|
||||
# on non-Western system locales even if it is in a comment.
|
||||
# MSVC warning wd4595 warns non-member operator new or delete functions
|
||||
# may not be declared inline, as of VS2015 Update 2.
|
||||
CFLAGS="$CFLAGS -wd4244 -wd4267 -wd4819"
|
||||
CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4482 -wd4800 -wd4819"
|
||||
CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4800 -wd4819 -wd4595"
|
||||
if test -n "$CLANG_CL"; then
|
||||
# XXX We should combine some of these with our generic GCC-style
|
||||
# warning checks.
|
||||
@@ -2762,11 +2761,13 @@ MOZ_PLACES=1
|
||||
MOZ_SOCIAL=1
|
||||
MOZ_PREF_EXTENSIONS=1
|
||||
MOZ_REFLOW_PERF=
|
||||
MOZ_SAFE_BROWSING=
|
||||
MOZ_HELP_VIEWER=
|
||||
MOZ_SPELLCHECK=1
|
||||
MOZ_TOOLKIT_SEARCH=1
|
||||
MOZ_UI_LOCALE=en-US
|
||||
MOZ_UNIVERSALCHARDET=1
|
||||
MOZ_URL_CLASSIFIER=
|
||||
MOZ_XUL=1
|
||||
MOZ_ZIPWRITER=1
|
||||
NS_PRINTING=1
|
||||
@@ -2786,6 +2787,7 @@ MOZ_ANDROID_HISTORY=
|
||||
MOZ_WEBSMS_BACKEND=
|
||||
MOZ_ANDROID_READING_LIST_SERVICE=
|
||||
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
|
||||
MOZ_INSTALL_TRACKING=
|
||||
ACCESSIBILITY=
|
||||
MOZ_TIME_MANAGER=
|
||||
MOZ_SIMPLEPUSH=
|
||||
@@ -3559,6 +3561,13 @@ if test -n "$MOZ_EXCLUDE_HYPHENATION_DICTIONARIES"; then
|
||||
AC_DEFINE(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Include install tracking on Android
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_INSTALL_TRACKING"; then
|
||||
AC_DEFINE(MOZ_INSTALL_TRACKING)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable IPDL's "expensive" unit tests
|
||||
dnl ========================================================
|
||||
@@ -6750,6 +6759,11 @@ AC_SUBST(MOZ_UNIVERSALCHARDET)
|
||||
AC_SUBST(ACCESSIBILITY)
|
||||
AC_SUBST(MOZ_SPELLCHECK)
|
||||
AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
|
||||
AC_SUBST(MOZ_CRASHREPORTER)
|
||||
AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)
|
||||
AC_SUBST(MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS)
|
||||
AC_SUBST(MOZ_MAINTENANCE_SERVICE)
|
||||
AC_SUBST(MOZ_STUB_INSTALLER)
|
||||
AC_SUBST(MOZ_VERIFY_MAR_SIGNATURE)
|
||||
AC_SUBST(MOZ_ENABLE_SIGNMAR)
|
||||
AC_SUBST(MOZ_UPDATER)
|
||||
@@ -6769,6 +6783,7 @@ AC_SUBST(MOZ_DISABLE_GECKOVIEW)
|
||||
AC_SUBST(MOZ_ANDROID_GECKOLIBS_AAR)
|
||||
AC_SUBST(MOZ_ANDROID_READING_LIST_SERVICE)
|
||||
AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
|
||||
AC_SUBST(MOZ_INSTALL_TRACKING)
|
||||
AC_SUBST(ENABLE_STRIP)
|
||||
AC_SUBST(PKG_SKIP_STRIP)
|
||||
AC_SUBST(STRIP_FLAGS)
|
||||
@@ -6781,13 +6796,19 @@ AC_SUBST(MOZ_FIX_LINK_PATHS)
|
||||
AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
|
||||
AC_SUBST(MOZ_LINKER_EXTRACT)
|
||||
|
||||
AC_SUBST(MOZ_ADDON_SIGNING)
|
||||
AC_SUBST(MOZ_REQUIRE_SIGNING)
|
||||
|
||||
if test -n "$MOZ_BINARY_EXTENSIONS"; then
|
||||
AC_DEFINE(MOZ_BINARY_EXTENSIONS)
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_ADDON_SIGNING)
|
||||
if test "$MOZ_ADDON_SIGNING" = 1; then
|
||||
AC_DEFINE(MOZ_ADDON_SIGNING)
|
||||
fi
|
||||
AC_SUBST(MOZ_REQUIRE_SIGNING)
|
||||
if test "$MOZ_REQUIRE_SIGNING" = 1; then
|
||||
AC_DEFINE(MOZ_REQUIRE_SIGNING)
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_JSDOWNLOADS)
|
||||
if test -n "$MOZ_JSDOWNLOADS"; then
|
||||
AC_DEFINE(MOZ_JSDOWNLOADS)
|
||||
@@ -6969,7 +6990,7 @@ fi
|
||||
dnl If we have any service that uploads data (and requires data submission
|
||||
dnl policy alert), set MOZ_DATA_REPORTING.
|
||||
dnl We need SUBST for build system and DEFINE for xul preprocessor.
|
||||
if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT"; then
|
||||
if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT" || test -n "$MOZ_CRASHREPORTER"; then
|
||||
MOZ_DATA_REPORTING=1
|
||||
AC_DEFINE(MOZ_DATA_REPORTING)
|
||||
AC_SUBST(MOZ_DATA_REPORTING)
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
[ -n "$WORKSPACE" ]
|
||||
[ -n "$MOZ_OBJDIR" ]
|
||||
[ -n "$GECKO_DIR" ]
|
||||
|
||||
HAZARD_SHELL_OBJDIR=$WORKSPACE/obj-haz-shell
|
||||
JS_SRCDIR=$GECKO_DIR/js/src
|
||||
ANALYSIS_SRCDIR=$JS_SRCDIR/devtools/rootAnalysis
|
||||
|
||||
export CC="$TOOLTOOL_DIR/gcc/bin/gcc"
|
||||
export CXX="$TOOLTOOL_DIR/gcc/bin/g++"
|
||||
|
||||
PYTHON=python2.7
|
||||
if ! which $PYTHON; then
|
||||
PYTHON=python
|
||||
fi
|
||||
|
||||
|
||||
function check_commit_msg () {
|
||||
hg --cwd "$GECKO_DIR" log -r. --template '{desc}\n' | grep -q -- "$1"
|
||||
}
|
||||
|
||||
if check_commit_msg "--dep"; then
|
||||
HAZ_DEP=1
|
||||
fi
|
||||
|
||||
function build_js_shell () {
|
||||
( cd $JS_SRCDIR; autoconf-2.13 )
|
||||
if [[ -z "$HAZ_DEP" ]]; then
|
||||
[ -d $HAZARD_SHELL_OBJDIR ] && rm -rf $HAZARD_SHELL_OBJDIR
|
||||
fi
|
||||
mkdir -p $HAZARD_SHELL_OBJDIR || true
|
||||
cd $HAZARD_SHELL_OBJDIR
|
||||
$JS_SRCDIR/configure --enable-optimize --disable-debug --enable-ctypes --enable-nspr-build --without-intl-api --with-ccache
|
||||
make -j4
|
||||
}
|
||||
|
||||
function configure_analysis () {
|
||||
local analysis_dir
|
||||
analysis_dir="$1"
|
||||
|
||||
if [[ -z "$HAZ_DEP" ]]; then
|
||||
[ -d "$analysis_dir" ] && rm -rf "$analysis_dir"
|
||||
fi
|
||||
|
||||
mkdir -p "$analysis_dir" || true
|
||||
(
|
||||
cd "$analysis_dir"
|
||||
cat > defaults.py <<EOF
|
||||
js = "$HAZARD_SHELL_OBJDIR/dist/bin/js"
|
||||
analysis_scriptdir = "$ANALYSIS_SRCDIR"
|
||||
objdir = "$MOZ_OBJDIR"
|
||||
source = "$GECKO_DIR"
|
||||
sixgill = "$TOOLTOOL_DIR/sixgill/usr/libexec/sixgill"
|
||||
sixgill_bin = "$TOOLTOOL_DIR/sixgill/usr/bin"
|
||||
EOF
|
||||
)
|
||||
}
|
||||
|
||||
function run_analysis () {
|
||||
local analysis_dir
|
||||
analysis_dir="$1"
|
||||
local build_type
|
||||
build_type="$2"
|
||||
|
||||
if [[ -z "$HAZ_DEP" ]]; then
|
||||
[ -d $MOZ_OBJDIR ] && rm -rf $MOZ_OBJDIR
|
||||
fi
|
||||
|
||||
(
|
||||
cd "$analysis_dir"
|
||||
$PYTHON "$ANALYSIS_SRCDIR/analyze.py" --buildcommand="$GECKO_DIR/testing/mozharness/scripts/spidermonkey/build.${build_type}"
|
||||
)
|
||||
}
|
||||
|
||||
function grab_artifacts () {
|
||||
local analysis_dir
|
||||
analysis_dir="$1"
|
||||
local artifacts
|
||||
artifacts="$2"
|
||||
|
||||
(
|
||||
cd "$analysis_dir"
|
||||
ls -lah
|
||||
|
||||
# Do not error out if no files found
|
||||
shopt -s nullglob
|
||||
set +e
|
||||
for f in *.txt *.lst; do
|
||||
gzip -9 -c "$f" > "${artifacts}/$f.gz"
|
||||
done
|
||||
|
||||
# Check whether the user requested .xdb file upload in the top commit comment
|
||||
if check_commit_msg "--upload-xdbs"; then
|
||||
HAZ_UPLOAD_XDBS=1
|
||||
fi
|
||||
|
||||
if [ -n "$HAZ_UPLOAD_XDBS" ]; then
|
||||
for f in *.xdb; do
|
||||
bzip2 -c "$f" > "${artifacts}/$f.bz2"
|
||||
done
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
function check_hazards () {
|
||||
(
|
||||
set +e
|
||||
NUM_HAZARDS=$(grep -c 'Function.*has unrooted.*live across GC call' "$1"/rootingHazards.txt)
|
||||
NUM_UNSAFE=$(grep -c '^Function.*takes unsafe address of unrooted' "$1"/refs.txt)
|
||||
NUM_UNNECESSARY=$(grep -c '^Function.* has unnecessary root' "$1"/unnecessary.txt)
|
||||
|
||||
echo "TinderboxPrint: $NUM_HAZARDS rooting hazards"
|
||||
echo "TinderboxPrint: $NUM_UNSAFE unsafe references to unrooted GC pointers"
|
||||
echo "TinderboxPrint: $NUM_UNSAFE unnecessary roots"
|
||||
|
||||
if [ $NUM_HAZARDS -gt 0 ]; then
|
||||
echo "TEST-UNEXPECTED-FAIL $NUM_HAZARDS hazards detected" >&2
|
||||
exit 1
|
||||
fi
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/firefox_base.yml'
|
||||
variables:
|
||||
build_name: 'browser-haz'
|
||||
build_type: 'debug'
|
||||
task:
|
||||
metadata:
|
||||
name: '[TC] Browser Hazard Linux'
|
||||
description: Browser Hazard Analysis Linux
|
||||
|
||||
workerType: dbg-linux64
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:tooltool-cache'
|
||||
- 'docker-worker:relengapi-proxy:tooltool.download.public'
|
||||
- 'docker-worker:cache:level-{{level}}-{{project}}-build-linux64-haz-workspace'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
level-{{level}}-{{project}}-build-linux64-haz-workspace: '/home/worker/workspace'
|
||||
tooltool-cache: '/home/worker/tools/tooltool-cache'
|
||||
|
||||
features:
|
||||
relengAPIProxy: true
|
||||
|
||||
env:
|
||||
MOZCONFIG: 'browser/config/mozconfigs/linux64/hazards'
|
||||
TOOLTOOL_CACHE: '/home/worker/tools/tooltool-cache'
|
||||
TOOLTOOL_MANIFEST: 'gecko/browser/config/tooltool-manifests/linux64/hazard.manifest'
|
||||
|
||||
maxRunTime: 36000
|
||||
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- >
|
||||
tc-vcs checkout workspace/gecko "$GECKO_BASE_REPOSITORY" "$GECKO_HEAD_REPOSITORY" "$GECKO_HEAD_REV" "$GECKO_HEAD_REF" &&
|
||||
cd ./workspace/gecko/testing/taskcluster/scripts/builder &&
|
||||
./build-browser-haz-linux.sh $HOME/workspace
|
||||
|
||||
extra:
|
||||
treeherderEnv:
|
||||
- production
|
||||
- staging
|
||||
treeherder:
|
||||
machine:
|
||||
# see https://github.com/mozilla/treeherder/blob/master/ui/js/values.js
|
||||
platform: linux64
|
||||
groupSymbol: tc
|
||||
groupName: Submitted by taskcluster for your pleasure
|
||||
symbol: H
|
||||
collection:
|
||||
debug: true
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: null
|
||||
tests: null
|
||||
@@ -0,0 +1,59 @@
|
||||
$inherits:
|
||||
from: 'tasks/builds/b2g_base.yml'
|
||||
variables:
|
||||
build_name: 'mulet-haz'
|
||||
build_type: 'debug'
|
||||
task:
|
||||
metadata:
|
||||
name: '[TC] Mulet Hazard Linux'
|
||||
description: Mulet Hazard Analysis Linux
|
||||
|
||||
workerType: mulet-debug
|
||||
|
||||
routes:
|
||||
- 'index.buildbot.branches.{{project}}.linux64-haz-mulet'
|
||||
- 'index.buildbot.revisions.{{head_rev}}.{{project}}.linux64-haz-mulet'
|
||||
|
||||
scopes:
|
||||
- 'docker-worker:cache:level-{{level}}-{{project}}-build-mulet-linux-workspace'
|
||||
- 'docker-worker:cache:tooltool-cache'
|
||||
- 'docker-worker:relengapi-proxy:tooltool.download.public'
|
||||
|
||||
payload:
|
||||
cache:
|
||||
level-{{level}}-{{project}}-build-mulet-haz-linux-workspace: '/home/worker/workspace'
|
||||
tooltool-cache: '/home/worker/tools/tooltool-cache'
|
||||
|
||||
features:
|
||||
relengAPIProxy: true
|
||||
|
||||
env:
|
||||
MOZCONFIG: 'b2g/dev/config/mozconfigs/linux64/mulet-hazards'
|
||||
TOOLTOOL_MANIFEST: 'gecko/b2g/dev/config/tooltool-manifests/linux64/hazard.manifest'
|
||||
|
||||
maxRunTime: 36000
|
||||
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- >
|
||||
checkout-gecko workspace &&
|
||||
cd ./workspace/gecko/testing/taskcluster/scripts/builder &&
|
||||
buildbot_step 'Build' ./build-mulet-haz-linux.sh $HOME/workspace
|
||||
|
||||
extra:
|
||||
treeherderEnv:
|
||||
- production
|
||||
- staging
|
||||
treeherder:
|
||||
groupSymbol: "tc"
|
||||
symbol: "H"
|
||||
tier: 3
|
||||
machine:
|
||||
platform: mulet-linux64
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
# tasks provide the "build" extra field to specify where the build and tests
|
||||
# files are located.
|
||||
locations:
|
||||
build: null
|
||||
tests: null
|
||||
@@ -18,8 +18,3 @@ libs::
|
||||
$(NSINSTALL) -D $(DIST)/bin/crashreporter.app/Contents/MacOS
|
||||
$(NSINSTALL) $(DIST)/bin/crashreporter $(DIST)/bin/crashreporter.app/Contents/MacOS
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
|
||||
libs:: $(topsrcdir)/toolkit/themes/windows/global/throbber/Throbber-small.gif
|
||||
$(INSTALL) $^ $(DIST)/bin
|
||||
endif
|
||||
|
||||
@@ -63,6 +63,11 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
||||
CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
CXXFLAGS += CONFIG['MOZ_GTHREAD_CFLAGS']
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'SunOS':
|
||||
FINAL_TARGET_FILES += [
|
||||
'/toolkit/themes/windows/global/throbber/Throbber-small.gif',
|
||||
]
|
||||
|
||||
RCINCLUDE = 'crashreporter.rc'
|
||||
|
||||
# Don't use the STL wrappers in the crashreporter clients; they don't
|
||||
|
||||
@@ -15,12 +15,6 @@ endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifneq (,$(filter gtk%,$(MOZ_WIDGET_TOOLKIT)))
|
||||
libs:: updater.png
|
||||
$(NSINSTALL) -D $(DIST)/bin/icons
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
|
||||
endif
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
libs::
|
||||
$(NSINSTALL) -D $(DIST)/bin/updater.app
|
||||
|
||||
@@ -45,3 +45,6 @@ else:
|
||||
secondary_cert.inputs += ['dep2.der']
|
||||
|
||||
xpcshell_cert.inputs += ['xpcshellCertificate.der']
|
||||
|
||||
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
||||
FINAL_TARGET_FILES.icons += ['updater.png']
|
||||
|
||||
@@ -26,14 +26,6 @@ interface nsIGeolocationUpdate : nsISupports {
|
||||
* This must be called on the main thread
|
||||
*/
|
||||
void update(in nsIDOMGeoPosition position);
|
||||
|
||||
/**
|
||||
* Notify the geolocation service that the location has
|
||||
* potentially changed, and thus a new position is in the
|
||||
* process of being acquired.
|
||||
*/
|
||||
void locationUpdatePending();
|
||||
|
||||
/**
|
||||
* Notify the geolocation service of an error.
|
||||
* This must be called on the main thread.
|
||||
@@ -83,7 +75,7 @@ interface nsIGeolocationProvider : nsISupports {
|
||||
};
|
||||
|
||||
%{C++
|
||||
/*
|
||||
/*
|
||||
This must be implemented by geolocation providers. It
|
||||
must support nsIGeolocationProvider.
|
||||
*/
|
||||
|
||||
@@ -12,9 +12,6 @@ libs::
|
||||
$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
|
||||
endif
|
||||
|
||||
libs::
|
||||
$(INSTALL) $(DIST)/bin/components/xpcomtest.xpt $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
|
||||
|
||||
ifeq (,$(filter-out WINNT, $(HOST_OS_ARCH)))
|
||||
getnativepath = $(call normalizepath,$(1))
|
||||
else
|
||||
|
||||
@@ -84,6 +84,10 @@ if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT'):
|
||||
'TestDeadlockDetectorScalability',
|
||||
])
|
||||
|
||||
TEST_HARNESS_FILES.xpcshell.xpcom.tests.unit += [
|
||||
'!/dist/bin/components/xpcomtest.xpt',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'xpcomtest'
|
||||
XPIDL_SOURCES += [
|
||||
'NotXPCOMTest.idl',
|
||||
|
||||
Reference in New Issue
Block a user