зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team
This commit is contained in:
Коммит
45d22ceb96
|
@ -634,60 +634,72 @@ SettingsListener.observe("accessibility.screenreader", false, function(value) {
|
|||
|
||||
// =================== Various simple mapping ======================
|
||||
let settingsToObserve = {
|
||||
'ril.mms.retrieval_mode': {
|
||||
prefName: 'dom.mms.retrieval_mode',
|
||||
defaultValue: 'manual'
|
||||
'app.update.channel': {
|
||||
resetToPref: true
|
||||
},
|
||||
'ril.sms.strict7BitEncoding.enabled': {
|
||||
prefName: 'dom.sms.strict7BitEncoding',
|
||||
defaultValue: false
|
||||
'app.update.interval': 86400,
|
||||
'app.update.url': {
|
||||
resetToPref: true
|
||||
},
|
||||
'ril.sms.requestStatusReport.enabled': {
|
||||
prefName: 'dom.sms.requestStatusReport',
|
||||
defaultValue: false
|
||||
},
|
||||
'ril.mms.requestStatusReport.enabled': {
|
||||
prefName: 'dom.mms.requestStatusReport',
|
||||
defaultValue: false
|
||||
},
|
||||
'ril.mms.requestReadReport.enabled': {
|
||||
prefName: 'dom.mms.requestReadReport',
|
||||
defaultValue: true
|
||||
},
|
||||
'ril.cellbroadcast.disabled': false,
|
||||
'ril.radio.disabled': false,
|
||||
'wap.UAProf.url': '',
|
||||
'wap.UAProf.tagname': 'x-wap-profile',
|
||||
'devtools.eventlooplag.threshold': 100,
|
||||
'privacy.donottrackheader.enabled': false,
|
||||
'apz.force-enable': {
|
||||
prefName: 'dom.browser_frames.useAsyncPanZoom',
|
||||
defaultValue: false
|
||||
},
|
||||
'layers.enable-tiles': true,
|
||||
'layers.simple-tiles': false,
|
||||
'layers.draw-tile-borders': false,
|
||||
'layers.dump': false,
|
||||
'debug.fps.enabled': {
|
||||
prefName: 'layers.acceleration.draw-fps',
|
||||
defaultValue: false
|
||||
},
|
||||
'debug.log-animations.enabled': {
|
||||
prefName: 'layers.offmainthreadcomposition.log-animations',
|
||||
defaultValue: false
|
||||
},
|
||||
'debug.paint-flashing.enabled': {
|
||||
prefName: 'nglayout.debug.paint_flashing',
|
||||
defaultValue: false
|
||||
},
|
||||
'devtools.eventlooplag.threshold': 100,
|
||||
'layers.draw-borders': false,
|
||||
'app.update.interval': 86400,
|
||||
'app.update.url': {
|
||||
resetToPref: true
|
||||
'layers.draw-tile-borders': false,
|
||||
'layers.dump': false,
|
||||
'layers.enable-tiles': true,
|
||||
'layers.simple-tiles': false,
|
||||
'privacy.donottrackheader.enabled': false,
|
||||
'ril.cellbroadcast.disabled': false,
|
||||
'ril.radio.disabled': false,
|
||||
'ril.mms.requestReadReport.enabled': {
|
||||
prefName: 'dom.mms.requestReadReport',
|
||||
defaultValue: true
|
||||
},
|
||||
'app.update.channel': {
|
||||
resetToPref: true
|
||||
},
|
||||
'debug.log-animations.enabled': {
|
||||
prefName: 'layers.offmainthreadcomposition.log-animations',
|
||||
'ril.mms.requestStatusReport.enabled': {
|
||||
prefName: 'dom.mms.requestStatusReport',
|
||||
defaultValue: false
|
||||
}
|
||||
},
|
||||
'ril.mms.retrieval_mode': {
|
||||
prefName: 'dom.mms.retrieval_mode',
|
||||
defaultValue: 'manual'
|
||||
},
|
||||
'ril.sms.requestStatusReport.enabled': {
|
||||
prefName: 'dom.sms.requestStatusReport',
|
||||
defaultValue: false
|
||||
},
|
||||
'ril.sms.strict7BitEncoding.enabled': {
|
||||
prefName: 'dom.sms.strict7BitEncoding',
|
||||
defaultValue: false
|
||||
},
|
||||
'ui.touch.radius.leftmm': {
|
||||
resetToPref: true
|
||||
},
|
||||
'ui.touch.radius.topmm': {
|
||||
resetToPref: true
|
||||
},
|
||||
'ui.touch.radius.rightmm': {
|
||||
resetToPref: true
|
||||
},
|
||||
'ui.touch.radius.bottommm': {
|
||||
resetToPref: true
|
||||
},
|
||||
'wap.UAProf.tagname': 'x-wap-profile',
|
||||
'wap.UAProf.url': ''
|
||||
};
|
||||
|
||||
for (let key in settingsToObserve) {
|
||||
|
|
|
@ -71,13 +71,18 @@ this.FxAccountsMgmtService = {
|
|||
|
||||
handleEvent: function(aEvent) {
|
||||
let msg = aEvent.detail;
|
||||
log.debug("Got content msg " + JSON.stringify(msg));
|
||||
log.debug("MgmtService got content event: " + JSON.stringify(msg));
|
||||
let self = FxAccountsMgmtService;
|
||||
|
||||
if (!msg.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.error) {
|
||||
self._onReject(msg.id, msg.error);
|
||||
return;
|
||||
}
|
||||
|
||||
let data = msg.data;
|
||||
if (!data) {
|
||||
return;
|
||||
|
|
|
@ -38,7 +38,7 @@ FxAccountsUIGlue.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
log.debug("Got content event " + JSON.stringify(msg));
|
||||
log.debug("UIGlue got content event " + JSON.stringify(msg));
|
||||
|
||||
if (msg.error) {
|
||||
deferred.reject(msg);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="65fba428f8d76336b33ddd9e15900357953600ba">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
|
@ -119,7 +119,7 @@
|
|||
<!-- Flame specific things -->
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="e8a318f7690092e639ba88891606f4183e846d3f"/>
|
||||
<project name="device/qcom/common" path="device/qcom/common" revision="34ed8345250bb97262d70a052217a92e83444ede"/>
|
||||
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="7dffe28a30abbcda13b0ba2d7a933d22bd82f9d7"/>
|
||||
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="b1d23890531de539e47e594e07e06b2dca54a85b"/>
|
||||
<project name="kernel/msm" path="kernel" revision="7158567fc83e7475f08db3adedc5df1ad6f54abd"/>
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="f2914eacee9120680a41463708bb6ee8291749fc"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="4b7ae991637a216d745e154cd49b4db6ca55a19e"/>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "993067c495a5e0956dfe4169f1f48d9a791304f0",
|
||||
"revision": "166c0ff9af0ce73ae5665d71715ea2bb96a4bacc",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="70953f779faf6b1a94861c34ffdc3d5fd1c442e5"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3a1d67246a79e3632c3b3f2460a25291e7e2714c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="abedd83e1ba61cb83e59c723ad6279ad2a7aa1d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="fd4be2909b788b563435fe0addb1bd98dfa75457"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
|
|
|
@ -2547,7 +2547,7 @@ AC_LANG_C
|
|||
dnl Check for .hidden assembler directive and visibility attribute.
|
||||
dnl Borrowed from glibc configure.in
|
||||
dnl ===============================================================
|
||||
if test "$GNU_CC"; then
|
||||
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
|
||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
||||
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
||||
if test -n "$gonkdir"; then
|
||||
|
@ -5806,6 +5806,11 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
|
|||
MOZ_D3DCOMPILER_VISTA_DLL=
|
||||
fi
|
||||
|
||||
# On mingw, check if headers are provided by toolchain.
|
||||
if test -n "$GNU_CC"; then
|
||||
MOZ_CHECK_HEADER(d3d10.h, MOZ_HAS_WINSDK_WITH_D3D=1)
|
||||
fi
|
||||
|
||||
######################################
|
||||
# Find _43 for use by XP.
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "mozilla/DOMEventTargetHelper.h"
|
||||
#include "mozilla/dom/EventSourceBinding.h"
|
||||
#include "mozilla/dom/MessageEvent.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
||||
#include "js/OldDebugAPI.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
@ -29,7 +30,6 @@
|
|||
#include "nsIChannelPolicy.h"
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCxPusher.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsCrossSiteListenerProxy.h"
|
||||
|
@ -1236,15 +1236,15 @@ EventSource::DispatchAllMessageEvents()
|
|||
return;
|
||||
}
|
||||
|
||||
// Let's play get the JSContext
|
||||
nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(GetOwner());
|
||||
NS_ENSURE_TRUE_VOID(sgo);
|
||||
// We need a parent object so that we can enter its compartment.
|
||||
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryInterface(GetParentObject());
|
||||
if (NS_WARN_IF(!parentObject)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsIScriptContext* scriptContext = sgo->GetContext();
|
||||
NS_ENSURE_TRUE_VOID(scriptContext);
|
||||
|
||||
AutoPushJSContext cx(scriptContext->GetNativeContext());
|
||||
NS_ENSURE_TRUE_VOID(cx);
|
||||
AutoJSAPI jsapi;
|
||||
JSContext* cx = jsapi.cx();
|
||||
JSAutoCompartment ac(cx, parentObject->GetGlobalJSObject());
|
||||
|
||||
while (mMessagesToDispatch.GetSize() > 0) {
|
||||
nsAutoPtr<Message>
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "nsIDOMApplicationRegistry.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsCxPusher.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
@ -2423,12 +2422,6 @@ nsFrameLoader::EnsureMessageManager()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIScriptContext* sctx = mOwnerContent->GetContextForEventHandlers(&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
NS_ENSURE_STATE(sctx);
|
||||
AutoPushJSContext cx(sctx->GetNativeContext());
|
||||
NS_ENSURE_STATE(cx);
|
||||
|
||||
nsCOMPtr<nsIDOMChromeWindow> chromeWindow =
|
||||
do_QueryInterface(GetOwnerDoc()->GetWindow());
|
||||
nsCOMPtr<nsIMessageBroadcaster> parentManager;
|
||||
|
|
|
@ -4286,16 +4286,18 @@ CanvasRenderingContext2D::ShouldForceInactiveLayer(LayerManager *aManager)
|
|||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(CanvasPath)
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPath, mParent)
|
||||
|
||||
CanvasPath::CanvasPath(nsCOMPtr<nsISupports> aParent) : mParent(aParent)
|
||||
CanvasPath::CanvasPath(nsISupports* aParent)
|
||||
: mParent(aParent)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
|
||||
mPathBuilder = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget()->CreatePathBuilder();
|
||||
}
|
||||
|
||||
CanvasPath::CanvasPath(nsCOMPtr<nsISupports> aParent, RefPtr<PathBuilder> aPathBuilder): mParent(aParent), mPathBuilder(aPathBuilder)
|
||||
CanvasPath::CanvasPath(nsISupports* aParent, RefPtr<PathBuilder> aPathBuilder)
|
||||
: mParent(aParent), mPathBuilder(aPathBuilder)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ extern const mozilla::gfx::Float SIGMA_MAX;
|
|||
|
||||
template<typename T> class Optional;
|
||||
|
||||
class CanvasPath :
|
||||
class CanvasPath MOZ_FINAL :
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
|
@ -88,8 +88,8 @@ public:
|
|||
mozilla::RefPtr<mozilla::gfx::Path> GetPath(const CanvasWindingRule& winding,
|
||||
const mozilla::RefPtr<mozilla::gfx::DrawTarget>& mTarget) const;
|
||||
|
||||
CanvasPath(nsCOMPtr<nsISupports> aParent);
|
||||
CanvasPath(nsCOMPtr<nsISupports> aParent, RefPtr<gfx::PathBuilder> mPathBuilder);
|
||||
explicit CanvasPath(nsISupports* aParent);
|
||||
CanvasPath(nsISupports* aParent, RefPtr<gfx::PathBuilder> mPathBuilder);
|
||||
virtual ~CanvasPath() {}
|
||||
|
||||
private:
|
||||
|
|
|
@ -383,4 +383,8 @@ function runTests() {
|
|||
|
||||
addLoadEvent(runTests);
|
||||
|
||||
// Don't leak the world via the Path2D reference to its window.
|
||||
document.all;
|
||||
window.p = new Path2D();
|
||||
|
||||
</script>
|
||||
|
|
|
@ -426,7 +426,7 @@ protected:
|
|||
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||
{
|
||||
static_cast<HTMLFormElement*>(mEventNode.get())->EventHandled();
|
||||
static_cast<HTMLFormElement*>(mTarget.get())->EventHandled();
|
||||
return AsyncEventDispatcher::Run();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -166,8 +166,7 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||
}
|
||||
|
||||
void
|
||||
AudioBuffer::SetRawChannelContents(JSContext* aJSContext, uint32_t aChannel,
|
||||
float* aContents)
|
||||
AudioBuffer::SetRawChannelContents(uint32_t aChannel, float* aContents)
|
||||
{
|
||||
PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannel]), aContents, mLength);
|
||||
}
|
||||
|
|
|
@ -97,9 +97,7 @@ public:
|
|||
// This function needs to be called on an AudioBuffer which has not been
|
||||
// handed off to the content yet, and right after the object has been
|
||||
// initialized.
|
||||
void SetRawChannelContents(JSContext* aJSContext,
|
||||
uint32_t aChannel,
|
||||
float* aContents);
|
||||
void SetRawChannelContents(uint32_t aChannel, float* aContents);
|
||||
|
||||
protected:
|
||||
bool RestoreJSChannelData(JSContext* aJSContext);
|
||||
|
|
|
@ -590,21 +590,16 @@ AudioContext::UpdateNodeCount(int32_t aDelta)
|
|||
}
|
||||
}
|
||||
|
||||
JSContext*
|
||||
AudioContext::GetJSContext() const
|
||||
JSObject*
|
||||
AudioContext::GetGlobalJSObject() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryInterface(GetParentObject());
|
||||
if (!parentObject) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIScriptGlobalObject> scriptGlobal =
|
||||
do_QueryInterface(GetParentObject());
|
||||
if (!scriptGlobal) {
|
||||
return nullptr;
|
||||
}
|
||||
nsIScriptContext* scriptContext = scriptGlobal->GetContext();
|
||||
if (!scriptContext) {
|
||||
return nullptr;
|
||||
}
|
||||
return scriptContext->GetNativeContext();
|
||||
// This can also return null.
|
||||
return parentObject->GetGlobalJSObject();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -219,7 +219,7 @@ public:
|
|||
void Mute() const;
|
||||
void Unmute() const;
|
||||
|
||||
JSContext* GetJSContext() const;
|
||||
JSObject* GetGlobalJSObject() const;
|
||||
|
||||
AudioChannel MozAudioChannelType() const;
|
||||
void SetMozAudioChannelType(AudioChannel aValue, ErrorResult& aRv);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "AudioDestinationNode.h"
|
||||
#include "mozilla/dom/AudioDestinationNodeBinding.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "AudioChannelAgent.h"
|
||||
|
@ -125,11 +126,15 @@ public:
|
|||
// which is strongly referenced by the runnable that called
|
||||
// AudioDestinationNode::FireOfflineCompletionEvent.
|
||||
|
||||
AutoPushJSContext cx(context->GetJSContext());
|
||||
if (!cx) {
|
||||
// We need the global for the context so that we can enter its compartment.
|
||||
JSObject* global = context->GetGlobalJSObject();
|
||||
if (NS_WARN_IF(!global)) {
|
||||
return;
|
||||
}
|
||||
JSAutoRequest ar(cx);
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
JSContext* cx = jsapi.cx();
|
||||
JSAutoCompartment ac(cx, global);
|
||||
|
||||
// Create the input buffer
|
||||
nsRefPtr<AudioBuffer> renderedBuffer = new AudioBuffer(context,
|
||||
|
@ -139,7 +144,7 @@ public:
|
|||
return;
|
||||
}
|
||||
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
||||
renderedBuffer->SetRawChannelContents(cx, i, mInputChannels[i]);
|
||||
renderedBuffer->SetRawChannelContents(i, mInputChannels[i]);
|
||||
}
|
||||
|
||||
nsRefPtr<OfflineAudioCompletionEvent> event =
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "AudioProcessingEvent.h"
|
||||
#include "mozilla/dom/AudioProcessingEventBinding.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "AudioContext.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -40,7 +41,15 @@ void
|
|||
AudioProcessingEvent::LazilyCreateBuffer(nsRefPtr<AudioBuffer>& aBuffer,
|
||||
uint32_t aNumberOfChannels)
|
||||
{
|
||||
AutoPushJSContext cx(mNode->Context()->GetJSContext());
|
||||
// We need the global for the context so that we can enter its compartment.
|
||||
JSObject* global = mNode->Context()->GetGlobalJSObject();
|
||||
if (NS_WARN_IF(!global)) {
|
||||
return;
|
||||
}
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
JSContext* cx = jsapi.cx();
|
||||
JSAutoCompartment ac(cx, global);
|
||||
|
||||
aBuffer = new AudioBuffer(mNode->Context(), mNode->BufferSize(),
|
||||
mNode->Context()->SampleRate());
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "MediaBufferDecoder.h"
|
||||
#include "BufferDecoder.h"
|
||||
#include "mozilla/dom/AudioContextBinding.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include <speex/speex_resampler.h>
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
@ -18,7 +19,6 @@
|
|||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsCxPusher.h"
|
||||
#include "WebAudioUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -402,12 +402,16 @@ WebAudioDecodeJob::AllocateBuffer()
|
|||
MOZ_ASSERT(!mOutput);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// First, get a JSContext
|
||||
AutoPushJSContext cx(mContext->GetJSContext());
|
||||
if (!cx) {
|
||||
// We need the global for the context so that we can enter its compartment.
|
||||
JSObject* global = mContext->GetGlobalJSObject();
|
||||
if (NS_WARN_IF(!global)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
JSContext* cx = jsapi.cx();
|
||||
JSAutoCompartment ac(cx, global);
|
||||
|
||||
// Now create the AudioBuffer
|
||||
mOutput = new AudioBuffer(mContext, mWriteIndex, mContext->SampleRate());
|
||||
if (!mOutput->InitializeBuffers(mChannelBuffers.Length(), cx)) {
|
||||
|
@ -415,7 +419,7 @@ WebAudioDecodeJob::AllocateBuffer()
|
|||
}
|
||||
|
||||
for (uint32_t i = 0; i < mChannelBuffers.Length(); ++i) {
|
||||
mOutput->SetRawChannelContents(cx, i, mChannelBuffers[i]);
|
||||
mOutput->SetRawChannelContents(i, mChannelBuffers[i]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "AudioNodeStream.h"
|
||||
#include "AudioProcessingEvent.h"
|
||||
#include "WebAudioUtils.h"
|
||||
#include "nsCxPusher.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include <deque>
|
||||
|
@ -402,44 +402,51 @@ private:
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
AutoPushJSContext cx(node->Context()->GetJSContext());
|
||||
if (cx) {
|
||||
|
||||
// Create the input buffer
|
||||
nsRefPtr<AudioBuffer> inputBuffer;
|
||||
if (!mNullInput) {
|
||||
inputBuffer = new AudioBuffer(node->Context(),
|
||||
node->BufferSize(),
|
||||
node->Context()->SampleRate());
|
||||
if (!inputBuffer->InitializeBuffers(mInputChannels.Length(), cx)) {
|
||||
return NS_OK;
|
||||
}
|
||||
// Put the channel data inside it
|
||||
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
||||
inputBuffer->SetRawChannelContents(cx, i, mInputChannels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Ask content to produce data in the output buffer
|
||||
// Note that we always avoid creating the output buffer here, and we try to
|
||||
// avoid creating the input buffer as well. The AudioProcessingEvent class
|
||||
// knows how to lazily create them if needed once the script tries to access
|
||||
// them. Otherwise, we may be able to get away without creating them!
|
||||
nsRefPtr<AudioProcessingEvent> event = new AudioProcessingEvent(node, nullptr, nullptr);
|
||||
event->InitEvent(inputBuffer,
|
||||
mInputChannels.Length(),
|
||||
mPlaybackTime);
|
||||
node->DispatchTrustedEvent(event);
|
||||
|
||||
// Steal the output buffers
|
||||
nsRefPtr<ThreadSharedFloatArrayBufferList> output;
|
||||
if (event->HasOutputBuffer()) {
|
||||
output = event->OutputBuffer()->GetThreadSharedChannelsForRate(cx);
|
||||
}
|
||||
|
||||
// Append it to our output buffer queue
|
||||
node->GetSharedBuffers()->FinishProducingOutputBuffer(output, node->BufferSize());
|
||||
// Get the global for the context so that we can enter its compartment.
|
||||
JSObject* global = node->Context()->GetGlobalJSObject();
|
||||
if (NS_WARN_IF(!global)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
AutoJSAPI jsapi;
|
||||
JSContext* cx = jsapi.cx();
|
||||
JSAutoCompartment ac(cx, global);
|
||||
|
||||
// Create the input buffer
|
||||
nsRefPtr<AudioBuffer> inputBuffer;
|
||||
if (!mNullInput) {
|
||||
inputBuffer = new AudioBuffer(node->Context(),
|
||||
node->BufferSize(),
|
||||
node->Context()->SampleRate());
|
||||
if (!inputBuffer->InitializeBuffers(mInputChannels.Length(), cx)) {
|
||||
return NS_OK;
|
||||
}
|
||||
// Put the channel data inside it
|
||||
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
||||
inputBuffer->SetRawChannelContents(i, mInputChannels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Ask content to produce data in the output buffer
|
||||
// Note that we always avoid creating the output buffer here, and we try to
|
||||
// avoid creating the input buffer as well. The AudioProcessingEvent class
|
||||
// knows how to lazily create them if needed once the script tries to access
|
||||
// them. Otherwise, we may be able to get away without creating them!
|
||||
nsRefPtr<AudioProcessingEvent> event = new AudioProcessingEvent(node, nullptr, nullptr);
|
||||
event->InitEvent(inputBuffer,
|
||||
mInputChannels.Length(),
|
||||
mPlaybackTime);
|
||||
node->DispatchTrustedEvent(event);
|
||||
|
||||
// Steal the output buffers
|
||||
nsRefPtr<ThreadSharedFloatArrayBufferList> output;
|
||||
if (event->HasOutputBuffer()) {
|
||||
output = event->OutputBuffer()->GetThreadSharedChannelsForRate(cx);
|
||||
}
|
||||
|
||||
// Append it to our output buffer queue
|
||||
node->GetSharedBuffers()->FinishProducingOutputBuffer(output, node->BufferSize());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
private:
|
||||
|
|
|
@ -13452,12 +13452,6 @@ nsGlobalWindow::GetMessageManager(ErrorResult& aError)
|
|||
MOZ_ASSERT(IsChromeWindow());
|
||||
nsGlobalChromeWindow* myself = static_cast<nsGlobalChromeWindow*>(this);
|
||||
if (!myself->mMessageManager) {
|
||||
nsIScriptContext* scx = GetContextInternal();
|
||||
if (NS_WARN_IF(!scx || !(scx->GetNativeContext()))) {
|
||||
aError.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIMessageBroadcaster> globalMM =
|
||||
do_GetService("@mozilla.org/globalmessagemanager;1");
|
||||
myself->mMessageManager =
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "BluetoothSocket.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <hardware/bluetooth.h>
|
||||
#include <hardware/bt_sock.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -81,15 +82,13 @@ ReadBdAddress(const uint8_t* aData, size_t* aOffset, nsAString& aDeviceAddress)
|
|||
*aOffset += 6;
|
||||
}
|
||||
|
||||
class mozilla::dom::bluetooth::DroidSocketImpl
|
||||
: public MessageLoopForIO::Watcher
|
||||
class mozilla::dom::bluetooth::DroidSocketImpl : public ipc::UnixFdWatcher
|
||||
{
|
||||
public:
|
||||
DroidSocketImpl(BluetoothSocket* aConsumer, int aFd)
|
||||
: mConsumer(aConsumer)
|
||||
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer, int aFd)
|
||||
: ipc::UnixFdWatcher(aIOLoop, aFd)
|
||||
, mConsumer(aConsumer)
|
||||
, mReadMsgForClientFd(false)
|
||||
, mIOLoop(nullptr)
|
||||
, mFd(aFd)
|
||||
, mShuttingDownOnIOThread(false)
|
||||
, mChannel(0)
|
||||
, mAuth(false)
|
||||
|
@ -97,24 +96,23 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
DroidSocketImpl(BluetoothSocket* aConsumer,
|
||||
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer,
|
||||
int aChannel, bool aAuth, bool aEncrypt)
|
||||
: mConsumer(aConsumer)
|
||||
: ipc::UnixFdWatcher(aIOLoop)
|
||||
, mConsumer(aConsumer)
|
||||
, mReadMsgForClientFd(false)
|
||||
, mIOLoop(nullptr)
|
||||
, mFd(-1)
|
||||
, mShuttingDownOnIOThread(false)
|
||||
, mChannel(aChannel)
|
||||
, mAuth(aAuth)
|
||||
, mEncrypt(aEncrypt)
|
||||
{ }
|
||||
|
||||
DroidSocketImpl(BluetoothSocket* aConsumer, const nsAString& aDeviceAddress,
|
||||
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer,
|
||||
const nsAString& aDeviceAddress,
|
||||
int aChannel, bool aAuth, bool aEncrypt)
|
||||
: mConsumer(aConsumer)
|
||||
: ipc::UnixFdWatcher(aIOLoop)
|
||||
, mConsumer(aConsumer)
|
||||
, mReadMsgForClientFd(false)
|
||||
, mIOLoop(nullptr)
|
||||
, mFd(-1)
|
||||
, mShuttingDownOnIOThread(false)
|
||||
, mDeviceAddress(aDeviceAddress)
|
||||
, mChannel(aChannel)
|
||||
|
@ -132,7 +130,7 @@ public:
|
|||
void QueueWriteData(UnixSocketRawData* aData)
|
||||
{
|
||||
mOutgoingQ.AppendElement(aData);
|
||||
OnFileCanWriteWithoutBlocking(mFd);
|
||||
OnFileCanWriteWithoutBlocking(GetFd());
|
||||
}
|
||||
|
||||
bool IsShutdownOnMainThread()
|
||||
|
@ -158,8 +156,7 @@ public:
|
|||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(!mShuttingDownOnIOThread);
|
||||
|
||||
mReadWatcher.StopWatchingFileDescriptor();
|
||||
mWriteWatcher.StopWatchingFileDescriptor();
|
||||
RemoveWatchers(READ_WATCHER | WRITE_WATCHER);
|
||||
|
||||
mShuttingDownOnIOThread = true;
|
||||
}
|
||||
|
@ -169,32 +166,16 @@ public:
|
|||
|
||||
void SetUpIO(bool aWrite)
|
||||
{
|
||||
MOZ_ASSERT(!mIOLoop);
|
||||
MOZ_ASSERT(mFd >= 0);
|
||||
mIOLoop = MessageLoopForIO::current();
|
||||
|
||||
// Set up a read watch
|
||||
mIOLoop->WatchFileDescriptor(mFd,
|
||||
true,
|
||||
MessageLoopForIO::WATCH_READ,
|
||||
&mReadWatcher,
|
||||
this);
|
||||
|
||||
AddWatchers(READ_WATCHER, true);
|
||||
if (aWrite) {
|
||||
// Set up a write watch
|
||||
mIOLoop->WatchFileDescriptor(mFd.get(),
|
||||
false,
|
||||
MessageLoopForIO::WATCH_WRITE,
|
||||
&mWriteWatcher,
|
||||
this);
|
||||
AddWatchers(WRITE_WATCHER, false);
|
||||
}
|
||||
}
|
||||
|
||||
void ConnectClientFd()
|
||||
{
|
||||
// Stop current read watch
|
||||
mReadWatcher.StopWatchingFileDescriptor();
|
||||
mIOLoop = nullptr;
|
||||
RemoveWatchers(READ_WATCHER);
|
||||
|
||||
// Restart read & write watch on client fd
|
||||
SetUpIO(true);
|
||||
|
@ -238,33 +219,12 @@ private:
|
|||
*/
|
||||
ssize_t ReadMsg(int aFd, void *aBuffer, size_t aLength);
|
||||
|
||||
/**
|
||||
* IO Loop pointer. Must be initalized and called from IO thread only.
|
||||
*/
|
||||
MessageLoopForIO* mIOLoop;
|
||||
|
||||
/**
|
||||
* Raw data queue. Must be pushed/popped from IO thread only.
|
||||
*/
|
||||
typedef nsTArray<UnixSocketRawData* > UnixSocketRawDataQueue;
|
||||
UnixSocketRawDataQueue mOutgoingQ;
|
||||
|
||||
/**
|
||||
* Read watcher for libevent. Only to be accessed on IO Thread.
|
||||
*/
|
||||
MessageLoopForIO::FileDescriptorWatcher mReadWatcher;
|
||||
|
||||
/**
|
||||
* Write watcher for libevent. Only to be accessed on IO Thread.
|
||||
*/
|
||||
MessageLoopForIO::FileDescriptorWatcher mWriteWatcher;
|
||||
|
||||
/**
|
||||
* File descriptor to read from/write to. Connection happens on user provided
|
||||
* thread. Read/write/close happens on IO thread.
|
||||
*/
|
||||
mozilla::ScopedClose mFd;
|
||||
|
||||
/**
|
||||
* If true, do not requeue whatever task we're running
|
||||
*/
|
||||
|
@ -496,23 +456,18 @@ DroidSocketImpl::Connect()
|
|||
NS_ENSURE_TRUE_VOID(status == BT_STATUS_SUCCESS);
|
||||
NS_ENSURE_TRUE_VOID(fd >= 0);
|
||||
|
||||
mFd = fd;
|
||||
int flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
|
||||
NS_ENSURE_TRUE_VOID(flags >= 0);
|
||||
|
||||
MOZ_ASSERT(!mIOLoop);
|
||||
mIOLoop = MessageLoopForIO::current();
|
||||
if (!(flags & O_NONBLOCK)) {
|
||||
int res = TEMP_FAILURE_RETRY(fcntl(fd, F_SETFL, flags | O_NONBLOCK));
|
||||
NS_ENSURE_TRUE_VOID(!res);
|
||||
}
|
||||
|
||||
// Set up a read watch
|
||||
mIOLoop->WatchFileDescriptor(mFd.get(),
|
||||
true,
|
||||
MessageLoopForIO::WATCH_READ,
|
||||
&mReadWatcher,
|
||||
this);
|
||||
// Set up a write watch
|
||||
mIOLoop->WatchFileDescriptor(mFd.get(),
|
||||
false,
|
||||
MessageLoopForIO::WATCH_WRITE,
|
||||
&mWriteWatcher,
|
||||
this);
|
||||
SetFd(fd);
|
||||
|
||||
AddWatchers(READ_WATCHER, true);
|
||||
AddWatchers(WRITE_WATCHER, false);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -534,17 +489,16 @@ DroidSocketImpl::Listen()
|
|||
NS_ENSURE_TRUE_VOID(status == BT_STATUS_SUCCESS);
|
||||
NS_ENSURE_TRUE_VOID(fd >= 0);
|
||||
|
||||
mFd = fd;
|
||||
int flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
|
||||
NS_ENSURE_TRUE_VOID(flags >= 0);
|
||||
|
||||
MOZ_ASSERT(!mIOLoop);
|
||||
mIOLoop = MessageLoopForIO::current();
|
||||
if (!(flags & O_NONBLOCK)) {
|
||||
int res = TEMP_FAILURE_RETRY(fcntl(fd, F_SETFL, flags | O_NONBLOCK));
|
||||
NS_ENSURE_TRUE_VOID(!res);
|
||||
}
|
||||
|
||||
// Set up a read watch
|
||||
mIOLoop->WatchFileDescriptor(mFd.get(),
|
||||
true,
|
||||
MessageLoopForIO::WATCH_READ,
|
||||
&mReadWatcher,
|
||||
this);
|
||||
SetFd(fd);
|
||||
AddWatchers(READ_WATCHER, true);
|
||||
}
|
||||
|
||||
ssize_t
|
||||
|
@ -566,7 +520,7 @@ DroidSocketImpl::ReadMsg(int aFd, void *aBuffer, size_t aLength)
|
|||
msg.msg_control = cmsgbuf;
|
||||
msg.msg_controllen = sizeof(cmsgbuf);
|
||||
|
||||
ret = recvmsg(mFd.get(), &msg, MSG_NOSIGNAL);
|
||||
ret = recvmsg(GetFd(), &msg, MSG_NOSIGNAL);
|
||||
if (ret < 0 && errno == EPIPE) {
|
||||
// Treat this as an end of stream
|
||||
return 0;
|
||||
|
@ -583,8 +537,17 @@ DroidSocketImpl::ReadMsg(int aFd, void *aBuffer, size_t aLength)
|
|||
}
|
||||
if (cmsgptr->cmsg_type == SCM_RIGHTS) {
|
||||
int *pDescriptors = (int *)CMSG_DATA(cmsgptr);
|
||||
|
||||
// Overwrite fd with client fd
|
||||
mFd.reset(pDescriptors[0]);
|
||||
int fd = pDescriptors[0];
|
||||
int flags = TEMP_FAILURE_RETRY(fcntl(fd, F_GETFL));
|
||||
NS_ENSURE_TRUE(flags >= 0, 0);
|
||||
if (!(flags & O_NONBLOCK)) {
|
||||
int res = TEMP_FAILURE_RETRY(fcntl(fd, F_SETFL, flags | O_NONBLOCK));
|
||||
NS_ENSURE_TRUE(!res, 0);
|
||||
}
|
||||
Close();
|
||||
SetFd(fd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -624,8 +587,7 @@ DroidSocketImpl::OnFileCanReadWithoutBlocking(int aFd)
|
|||
|
||||
// We're done with our descriptors. Ensure that spurious events don't
|
||||
// cause us to end up back here.
|
||||
mReadWatcher.StopWatchingFileDescriptor();
|
||||
mWriteWatcher.StopWatchingFileDescriptor();
|
||||
RemoveWatchers(READ_WATCHER | WRITE_WATCHER);
|
||||
nsRefPtr<RequestClosingSocketTask> t = new RequestClosingSocketTask(this);
|
||||
NS_DispatchToMainThread(t);
|
||||
return;
|
||||
|
@ -682,13 +644,7 @@ DroidSocketImpl::OnFileCanWriteWithoutBlocking(int aFd)
|
|||
}
|
||||
|
||||
if (data->mCurrentWriteOffset != data->mSize) {
|
||||
MessageLoopForIO::current()->WatchFileDescriptor(
|
||||
aFd,
|
||||
false,
|
||||
MessageLoopForIO::WATCH_WRITE,
|
||||
&mWriteWatcher,
|
||||
this);
|
||||
return;
|
||||
AddWatchers(WRITE_WATCHER, false);
|
||||
}
|
||||
mOutgoingQ.RemoveElementAt(0);
|
||||
delete data;
|
||||
|
@ -737,7 +693,8 @@ BluetoothSocket::Connect(const nsAString& aDeviceAddress, int aChannel)
|
|||
NS_ENSURE_FALSE(mImpl, false);
|
||||
|
||||
mIsServer = false;
|
||||
mImpl = new DroidSocketImpl(this, aDeviceAddress, aChannel, mAuth, mEncrypt);
|
||||
mImpl = new DroidSocketImpl(XRE_GetIOMessageLoop(), this, aDeviceAddress,
|
||||
aChannel, mAuth, mEncrypt);
|
||||
XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
|
||||
new SocketConnectTask(mImpl));
|
||||
|
||||
|
@ -751,7 +708,8 @@ BluetoothSocket::Listen(int aChannel)
|
|||
NS_ENSURE_FALSE(mImpl, false);
|
||||
|
||||
mIsServer = true;
|
||||
mImpl = new DroidSocketImpl(this, aChannel, mAuth, mEncrypt);
|
||||
mImpl = new DroidSocketImpl(XRE_GetIOMessageLoop(), this, aChannel, mAuth,
|
||||
mEncrypt);
|
||||
XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
|
||||
new SocketListenTask(mImpl));
|
||||
return true;
|
||||
|
|
|
@ -19,13 +19,13 @@ using namespace dom;
|
|||
* mozilla::AsyncEventDispatcher
|
||||
******************************************************************************/
|
||||
|
||||
AsyncEventDispatcher::AsyncEventDispatcher(nsINode* aEventNode,
|
||||
AsyncEventDispatcher::AsyncEventDispatcher(EventTarget* aTarget,
|
||||
WidgetEvent& aEvent)
|
||||
: mEventNode(aEventNode)
|
||||
: mTarget(aTarget)
|
||||
, mDispatchChromeOnly(false)
|
||||
{
|
||||
MOZ_ASSERT(mEventNode);
|
||||
EventDispatcher::CreateEvent(aEventNode, nullptr, &aEvent, EmptyString(),
|
||||
MOZ_ASSERT(mTarget);
|
||||
EventDispatcher::CreateEvent(aTarget, nullptr, &aEvent, EmptyString(),
|
||||
getter_AddRefs(mEvent));
|
||||
NS_ASSERTION(mEvent, "Should never fail to create an event");
|
||||
mEvent->DuplicatePrivateData();
|
||||
|
@ -39,8 +39,9 @@ AsyncEventDispatcher::Run()
|
|||
if (mDispatchChromeOnly) {
|
||||
MOZ_ASSERT(mEvent->InternalDOMEvent()->IsTrusted());
|
||||
|
||||
nsCOMPtr<nsIDocument> ownerDoc = mEventNode->OwnerDoc();
|
||||
nsPIDOMWindow* window = ownerDoc->GetWindow();
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(mTarget);
|
||||
MOZ_ASSERT(node, "ChromeOnly dispatch supported with Node targets only!");
|
||||
nsPIDOMWindow* window = node->OwnerDoc()->GetWindow();
|
||||
if (!window) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
@ -52,18 +53,23 @@ AsyncEventDispatcher::Run()
|
|||
EventDispatcher::DispatchDOMEvent(target, nullptr, mEvent,
|
||||
nullptr, nullptr);
|
||||
} else {
|
||||
nsCOMPtr<EventTarget> target = mEventNode.get();
|
||||
bool defaultActionEnabled; // This is not used because the caller is async
|
||||
target->DispatchEvent(mEvent, &defaultActionEnabled);
|
||||
mTarget->DispatchEvent(mEvent, &defaultActionEnabled);
|
||||
}
|
||||
} else {
|
||||
nsIDocument* doc = mEventNode->OwnerDoc();
|
||||
if (mDispatchChromeOnly) {
|
||||
nsContentUtils::DispatchChromeEvent(doc, mEventNode, mEventType,
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(mTarget);
|
||||
MOZ_ASSERT(node, "ChromeOnly dispatch supported with Node targets only!");
|
||||
nsContentUtils::DispatchChromeEvent(node->OwnerDoc(), node, mEventType,
|
||||
mBubbles, false);
|
||||
} else {
|
||||
nsContentUtils::DispatchTrustedEvent(doc, mEventNode, mEventType,
|
||||
mBubbles, false);
|
||||
nsCOMPtr<nsIDOMEvent> event;
|
||||
NS_NewDOMEvent(getter_AddRefs(event), mTarget, nullptr, nullptr);
|
||||
nsresult rv = event->InitEvent(mEventType, mBubbles, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
event->SetTrusted(true);
|
||||
bool dummy;
|
||||
mTarget->DispatchEvent(event, &dummy);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,12 +79,14 @@ AsyncEventDispatcher::Run()
|
|||
nsresult
|
||||
AsyncEventDispatcher::PostDOMEvent()
|
||||
{
|
||||
nsRefPtr<AsyncEventDispatcher> ensureDeletionWhenFailing = this;
|
||||
return NS_DispatchToCurrentThread(this);
|
||||
}
|
||||
|
||||
void
|
||||
AsyncEventDispatcher::RunDOMEventWhenSafe()
|
||||
{
|
||||
nsRefPtr<AsyncEventDispatcher> ensureDeletionWhenFailing = this;
|
||||
nsContentUtils::AddScriptRunner(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,29 +26,38 @@ namespace mozilla {
|
|||
class AsyncEventDispatcher : public nsRunnable
|
||||
{
|
||||
public:
|
||||
AsyncEventDispatcher(nsINode* aEventNode, const nsAString& aEventType,
|
||||
AsyncEventDispatcher(nsINode* aTarget, const nsAString& aEventType,
|
||||
bool aBubbles, bool aDispatchChromeOnly)
|
||||
: mEventNode(aEventNode)
|
||||
: mTarget(aTarget)
|
||||
, mEventType(aEventType)
|
||||
, mBubbles(aBubbles)
|
||||
, mDispatchChromeOnly(aDispatchChromeOnly)
|
||||
{
|
||||
}
|
||||
|
||||
AsyncEventDispatcher(nsINode* aEventNode, nsIDOMEvent* aEvent)
|
||||
: mEventNode(aEventNode)
|
||||
AsyncEventDispatcher(dom::EventTarget* aTarget, const nsAString& aEventType,
|
||||
bool aBubbles)
|
||||
: mTarget(aTarget)
|
||||
, mEventType(aEventType)
|
||||
, mBubbles(aBubbles)
|
||||
, mDispatchChromeOnly(false)
|
||||
{
|
||||
}
|
||||
|
||||
AsyncEventDispatcher(dom::EventTarget* aTarget, nsIDOMEvent* aEvent)
|
||||
: mTarget(aTarget)
|
||||
, mEvent(aEvent)
|
||||
, mDispatchChromeOnly(false)
|
||||
{
|
||||
}
|
||||
|
||||
AsyncEventDispatcher(nsINode* aEventNode, WidgetEvent& aEvent);
|
||||
AsyncEventDispatcher(dom::EventTarget* aTarget, WidgetEvent& aEvent);
|
||||
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE;
|
||||
nsresult PostDOMEvent();
|
||||
void RunDOMEventWhenSafe();
|
||||
|
||||
nsCOMPtr<nsINode> mEventNode;
|
||||
nsCOMPtr<dom::EventTarget> mTarget;
|
||||
nsCOMPtr<nsIDOMEvent> mEvent;
|
||||
nsString mEventType;
|
||||
bool mBubbles;
|
||||
|
|
|
@ -501,6 +501,11 @@ nsTArray<ContentParent*>* ContentParent::sNonAppContentParents;
|
|||
nsTArray<ContentParent*>* ContentParent::sPrivateContent;
|
||||
StaticAutoPtr<LinkedList<ContentParent> > ContentParent::sContentParents;
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
// The pref updates sent to the Nuwa process.
|
||||
static nsTArray<PrefSetting>* sNuwaPrefUpdates;
|
||||
#endif
|
||||
|
||||
// This is true when subprocess launching is enabled. This is the
|
||||
// case between StartUp() and ShutDown() or JoinAllSubprocesses().
|
||||
static bool sCanLaunchSubprocesses;
|
||||
|
@ -1325,6 +1330,14 @@ ContentParent::ActorDestroy(ActorDestroyReason why)
|
|||
// remove the global remote preferences observers
|
||||
Preferences::RemoveObserver(this, "");
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
// Remove the pref update requests.
|
||||
if (IsNuwaProcess() && sNuwaPrefUpdates) {
|
||||
delete sNuwaPrefUpdates;
|
||||
sNuwaPrefUpdates = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
RecvRemoveGeolocationListener();
|
||||
|
||||
mConsoleService = nullptr;
|
||||
|
@ -2115,6 +2128,13 @@ ContentParent::RecvAddNewProcess(const uint32_t& aPid,
|
|||
aPid,
|
||||
aFds);
|
||||
content->Init();
|
||||
|
||||
size_t numNuwaPrefUpdates = sNuwaPrefUpdates ?
|
||||
sNuwaPrefUpdates->Length() : 0;
|
||||
// Resend pref updates to the forked child.
|
||||
for (int i = 0; i < numNuwaPrefUpdates; i++) {
|
||||
content->SendPreferenceUpdate(sNuwaPrefUpdates->ElementAt(i));
|
||||
}
|
||||
PreallocatedProcessManager::PublishSpareProcess(content);
|
||||
return true;
|
||||
#else
|
||||
|
@ -2162,9 +2182,22 @@ ContentParent::Observe(nsISupports* aSubject,
|
|||
|
||||
PrefSetting pref(strData, null_t(), null_t());
|
||||
Preferences::GetPreference(&pref);
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
if (IsNuwaProcess() && PreallocatedProcessManager::IsNuwaReady()) {
|
||||
// Don't send the pref update to the Nuwa process. Save the update
|
||||
// to send to the forked child.
|
||||
if (!sNuwaPrefUpdates) {
|
||||
sNuwaPrefUpdates = new nsTArray<PrefSetting>();
|
||||
}
|
||||
sNuwaPrefUpdates->AppendElement(pref);
|
||||
} else if (!SendPreferenceUpdate(pref)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
#else
|
||||
if (!SendPreferenceUpdate(pref)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (!strcmp(aTopic, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC)) {
|
||||
NS_ConvertUTF16toUTF8 dataStr(aData);
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
void DelayedNuwaFork();
|
||||
void PublishSpareProcess(ContentParent* aContent);
|
||||
void MaybeForgetSpare(ContentParent* aContent);
|
||||
bool IsNuwaReady();
|
||||
void OnNuwaReady();
|
||||
bool PreallocatedProcessReady();
|
||||
already_AddRefed<ContentParent> GetSpareProcess();
|
||||
|
@ -340,6 +341,12 @@ PreallocatedProcessManagerImpl::MaybeForgetSpare(ContentParent* aContent)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
PreallocatedProcessManagerImpl::IsNuwaReady()
|
||||
{
|
||||
return mIsNuwaReady;
|
||||
}
|
||||
|
||||
void
|
||||
PreallocatedProcessManagerImpl::OnNuwaReady()
|
||||
{
|
||||
|
@ -482,6 +489,12 @@ PreallocatedProcessManager::OnNuwaReady()
|
|||
GetPPMImpl()->OnNuwaReady();
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
PreallocatedProcessManager::IsNuwaReady()
|
||||
{
|
||||
return GetPPMImpl()->IsNuwaReady();
|
||||
}
|
||||
|
||||
/*static */ bool
|
||||
PreallocatedProcessManager::PreallocatedProcessReady()
|
||||
{
|
||||
|
|
|
@ -83,6 +83,7 @@ public:
|
|||
#ifdef MOZ_NUWA_PROCESS
|
||||
static void PublishSpareProcess(ContentParent* aContent);
|
||||
static void MaybeForgetSpare(ContentParent* aContent);
|
||||
static bool IsNuwaReady();
|
||||
static void OnNuwaReady();
|
||||
static bool PreallocatedProcessReady();
|
||||
static void RunAfterPreallocatedProcessReady(nsIRunnable* aRunnable);
|
||||
|
|
|
@ -68,13 +68,6 @@ TextureClientX11::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor)
|
|||
return true;
|
||||
}
|
||||
|
||||
TextureClientData*
|
||||
TextureClientX11::DropTextureData()
|
||||
{
|
||||
MOZ_ASSERT(!(mFlags & TextureFlags::DEALLOCATE_CLIENT));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
TextureClientX11::AllocateForSurface(IntSize aSize, TextureAllocationFlags aTextureFlags)
|
||||
{
|
||||
|
|
|
@ -29,8 +29,6 @@ class TextureClientX11 : public TextureClient
|
|||
|
||||
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
||||
|
||||
virtual bool Lock(OpenMode aMode) MOZ_OVERRIDE;
|
||||
|
|
|
@ -27,7 +27,6 @@ class ImageBridgeChild;
|
|||
class CompositableForwarder;
|
||||
class CompositableChild;
|
||||
class SurfaceDescriptor;
|
||||
class TextureClientData;
|
||||
class PCompositableChild;
|
||||
/**
|
||||
* CompositableClient manages the texture-specific logic for composite layers,
|
||||
|
|
|
@ -82,7 +82,6 @@ public:
|
|||
|
||||
TextureChild()
|
||||
: mForwarder(nullptr)
|
||||
, mTextureData(nullptr)
|
||||
, mTextureClient(nullptr)
|
||||
, mIPCOpen(false)
|
||||
{
|
||||
|
@ -104,18 +103,6 @@ public:
|
|||
SendClientRecycle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Only used during the deallocation phase iff we need synchronization between
|
||||
* the client and host side for deallocation (that is, when the data is going
|
||||
* to be deallocated or recycled on the client side).
|
||||
*/
|
||||
void SetTextureData(TextureClientData* aData)
|
||||
{
|
||||
mTextureData = aData;
|
||||
}
|
||||
|
||||
void DeleteTextureData();
|
||||
|
||||
CompositableForwarder* GetForwarder() { return mForwarder; }
|
||||
|
||||
ISurfaceAllocator* GetAllocator() { return mForwarder; }
|
||||
|
@ -143,28 +130,15 @@ private:
|
|||
|
||||
RefPtr<CompositableForwarder> mForwarder;
|
||||
RefPtr<TextureClient> mWaitForRecycle;
|
||||
TextureClientData* mTextureData;
|
||||
TextureClient* mTextureClient;
|
||||
bool mIPCOpen;
|
||||
|
||||
friend class TextureClient;
|
||||
};
|
||||
|
||||
void
|
||||
TextureChild::DeleteTextureData()
|
||||
{
|
||||
mWaitForRecycle = nullptr;
|
||||
if (mTextureData) {
|
||||
mTextureData->DeallocateSharedData(GetAllocator());
|
||||
delete mTextureData;
|
||||
mTextureData = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
TextureChild::Recv__delete__()
|
||||
{
|
||||
DeleteTextureData();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -362,80 +336,6 @@ TextureClient::CreateBufferTextureClient(ISurfaceAllocator* aAllocator,
|
|||
return result.forget();
|
||||
}
|
||||
|
||||
|
||||
class ShmemTextureClientData : public TextureClientData
|
||||
{
|
||||
public:
|
||||
ShmemTextureClientData(ipc::Shmem& aShmem)
|
||||
: mShmem(aShmem)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ShmemTextureClientData);
|
||||
}
|
||||
|
||||
~ShmemTextureClientData()
|
||||
{
|
||||
MOZ_COUNT_CTOR(ShmemTextureClientData);
|
||||
}
|
||||
|
||||
virtual void DeallocateSharedData(ISurfaceAllocator* allocator)
|
||||
{
|
||||
allocator->DeallocShmem(mShmem);
|
||||
mShmem = ipc::Shmem();
|
||||
}
|
||||
|
||||
private:
|
||||
ipc::Shmem mShmem;
|
||||
};
|
||||
|
||||
class MemoryTextureClientData : public TextureClientData
|
||||
{
|
||||
public:
|
||||
MemoryTextureClientData(uint8_t* aBuffer)
|
||||
: mBuffer(aBuffer)
|
||||
{
|
||||
MOZ_COUNT_CTOR(MemoryTextureClientData);
|
||||
}
|
||||
|
||||
~MemoryTextureClientData()
|
||||
{
|
||||
MOZ_ASSERT(!mBuffer, "Forgot to deallocate the shared texture data?");
|
||||
MOZ_COUNT_DTOR(MemoryTextureClientData);
|
||||
}
|
||||
|
||||
virtual void DeallocateSharedData(ISurfaceAllocator*)
|
||||
{
|
||||
delete[] mBuffer;
|
||||
mBuffer = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t* mBuffer;
|
||||
};
|
||||
|
||||
TextureClientData*
|
||||
MemoryTextureClient::DropTextureData()
|
||||
{
|
||||
if (!mBuffer) {
|
||||
return nullptr;
|
||||
}
|
||||
TextureClientData* result = new MemoryTextureClientData(mBuffer);
|
||||
MarkInvalid();
|
||||
mBuffer = nullptr;
|
||||
return result;
|
||||
}
|
||||
|
||||
TextureClientData*
|
||||
ShmemTextureClient::DropTextureData()
|
||||
{
|
||||
if (!mShmem.IsReadable()) {
|
||||
return nullptr;
|
||||
}
|
||||
TextureClientData* result = new ShmemTextureClientData(mShmem);
|
||||
MarkInvalid();
|
||||
mShmem = ipc::Shmem();
|
||||
return result;
|
||||
}
|
||||
|
||||
TextureClient::TextureClient(TextureFlags aFlags)
|
||||
: mFlags(aFlags)
|
||||
, mShared(false)
|
||||
|
|
|
@ -80,28 +80,6 @@ public:
|
|||
StereoMode aStereoMode) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Holds the shared data of a TextureClient, to be destroyed later.
|
||||
*
|
||||
* TextureClient's destructor initiates the destruction sequence of the
|
||||
* texture client/host pair. If the shared data is to be deallocated on the
|
||||
* host side, there is nothing to do.
|
||||
* On the other hand, if the client data must be deallocated on the client
|
||||
* side, the CompositableClient will ask the TextureClient to drop its shared
|
||||
* data in the form of a TextureClientData object. This data will be kept alive
|
||||
* until the host side confirms that it is not using the data anymore and that
|
||||
* it is completely safe to deallocate the shared data.
|
||||
*
|
||||
* See:
|
||||
* - The PTexture IPDL protocol
|
||||
* - CompositableChild in TextureClient.cpp
|
||||
*/
|
||||
class TextureClientData {
|
||||
public:
|
||||
virtual void DeallocateSharedData(ISurfaceAllocator* allocator) = 0;
|
||||
virtual ~TextureClientData() {}
|
||||
};
|
||||
|
||||
/**
|
||||
* TextureClient is a thin abstraction over texture data that need to be shared
|
||||
* between the content process and the compositor process. It is the
|
||||
|
@ -344,16 +322,6 @@ protected:
|
|||
*/
|
||||
void MarkInvalid() { mValid = false; }
|
||||
|
||||
/**
|
||||
* Drop the shared data into a TextureClientData object and mark this
|
||||
* TextureClient as invalid.
|
||||
*
|
||||
* The TextureClient must not hold any reference to the shared data
|
||||
* after this method has been called.
|
||||
* The TextureClientData is owned by the caller.
|
||||
*/
|
||||
virtual TextureClientData* DropTextureData() = 0;
|
||||
|
||||
/**
|
||||
* Should only be called *once* per texture, in TextureClient::InitIPDLActor.
|
||||
* Some texture implementations rely on the fact that the descriptor will be
|
||||
|
@ -470,8 +438,6 @@ public:
|
|||
|
||||
virtual bool IsAllocated() const MOZ_OVERRIDE { return mAllocated; }
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
mozilla::ipc::Shmem& GetShmem() { return mShmem; }
|
||||
|
@ -506,8 +472,6 @@ public:
|
|||
|
||||
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
uint8_t* mBuffer;
|
||||
size_t mBufSize;
|
||||
|
|
|
@ -50,8 +50,6 @@ public:
|
|||
|
||||
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE { return nullptr; }
|
||||
|
||||
virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE { return mFormat; }
|
||||
|
||||
virtual bool CanExposeDrawTarget() const MOZ_OVERRIDE { return true; }
|
||||
|
|
|
@ -304,28 +304,6 @@ TextureSourceD3D9::SurfaceToTexture(DeviceManagerD3D9* aDeviceManager,
|
|||
return texture;
|
||||
}
|
||||
|
||||
class D3D9TextureClientData : public TextureClientData
|
||||
{
|
||||
public:
|
||||
D3D9TextureClientData(IDirect3DTexture9* aTexture)
|
||||
: mTexture(aTexture)
|
||||
{}
|
||||
|
||||
D3D9TextureClientData(gfxWindowsSurface* aWindowSurface)
|
||||
: mWindowSurface(aWindowSurface)
|
||||
{}
|
||||
|
||||
virtual void DeallocateSharedData(ISurfaceAllocator*) MOZ_OVERRIDE
|
||||
{
|
||||
mWindowSurface = nullptr;
|
||||
mTexture = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<IDirect3DTexture9> mTexture;
|
||||
nsRefPtr<gfxWindowsSurface> mWindowSurface;
|
||||
};
|
||||
|
||||
DataTextureSourceD3D9::DataTextureSourceD3D9(gfx::SurfaceFormat aFormat,
|
||||
CompositorD3D9* aCompositor,
|
||||
TextureFlags aFlags,
|
||||
|
@ -702,15 +680,6 @@ CairoTextureClientD3D9::AllocateForSurface(gfx::IntSize aSize, TextureAllocation
|
|||
return true;
|
||||
}
|
||||
|
||||
TextureClientData*
|
||||
CairoTextureClientD3D9::DropTextureData()
|
||||
{
|
||||
TextureClientData* data = new D3D9TextureClientData(mTexture);
|
||||
mTexture = nullptr;
|
||||
MarkInvalid();
|
||||
return data;
|
||||
}
|
||||
|
||||
DIBTextureClientD3D9::DIBTextureClientD3D9(gfx::SurfaceFormat aFormat, TextureFlags aFlags)
|
||||
: TextureClient(aFlags)
|
||||
, mFormat(aFormat)
|
||||
|
@ -793,15 +762,6 @@ DIBTextureClientD3D9::AllocateForSurface(gfx::IntSize aSize, TextureAllocationFl
|
|||
return true;
|
||||
}
|
||||
|
||||
TextureClientData*
|
||||
DIBTextureClientD3D9::DropTextureData()
|
||||
{
|
||||
TextureClientData* data = new D3D9TextureClientData(mSurface);
|
||||
mSurface = nullptr;
|
||||
MarkInvalid();
|
||||
return data;
|
||||
}
|
||||
|
||||
SharedTextureClientD3D9::SharedTextureClientD3D9(gfx::SurfaceFormat aFormat, TextureFlags aFlags)
|
||||
: TextureClient(aFlags)
|
||||
, mFormat(aFormat)
|
||||
|
@ -816,15 +776,6 @@ SharedTextureClientD3D9::~SharedTextureClientD3D9()
|
|||
MOZ_COUNT_DTOR(SharedTextureClientD3D9);
|
||||
}
|
||||
|
||||
TextureClientData*
|
||||
SharedTextureClientD3D9::DropTextureData()
|
||||
{
|
||||
TextureClientData* data = new D3D9TextureClientData(mTexture);
|
||||
mTexture = nullptr;
|
||||
MarkInvalid();
|
||||
return data;
|
||||
}
|
||||
|
||||
bool
|
||||
SharedTextureClientD3D9::Lock(OpenMode)
|
||||
{
|
||||
|
|
|
@ -207,8 +207,6 @@ public:
|
|||
|
||||
virtual gfx::SurfaceFormat GetFormat() const { return mFormat; }
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool CanExposeDrawTarget() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
virtual TemporaryRef<gfx::DrawTarget> GetAsDrawTarget() MOZ_OVERRIDE;
|
||||
|
@ -258,8 +256,6 @@ public:
|
|||
|
||||
virtual gfx::SurfaceFormat GetFormat() const { return mFormat; }
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool CanExposeDrawTarget() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
virtual TemporaryRef<gfx::DrawTarget> GetAsDrawTarget() MOZ_OVERRIDE;
|
||||
|
@ -314,8 +310,6 @@ public:
|
|||
return gfx::IntSize(mDesc.Width, mDesc.Height);
|
||||
}
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -18,35 +18,6 @@ namespace layers {
|
|||
using namespace mozilla::gfx;
|
||||
using namespace android;
|
||||
|
||||
class GrallocTextureClientData : public TextureClientData {
|
||||
public:
|
||||
GrallocTextureClientData(MaybeMagicGrallocBufferHandle aDesc)
|
||||
: mGrallocHandle(aDesc)
|
||||
{
|
||||
MOZ_COUNT_CTOR(GrallocTextureClientData);
|
||||
}
|
||||
|
||||
~GrallocTextureClientData()
|
||||
{
|
||||
MOZ_COUNT_DTOR(GrallocTextureClientData);
|
||||
}
|
||||
|
||||
virtual void DeallocateSharedData(ISurfaceAllocator* allocator) MOZ_OVERRIDE
|
||||
{
|
||||
allocator->DeallocGrallocBuffer(&mGrallocHandle);
|
||||
}
|
||||
|
||||
private:
|
||||
MaybeMagicGrallocBufferHandle mGrallocHandle;
|
||||
};
|
||||
|
||||
TextureClientData*
|
||||
GrallocTextureClientOGL::DropTextureData()
|
||||
{
|
||||
TextureClientData* result = new GrallocTextureClientData(mGrallocHandle);
|
||||
return result;
|
||||
}
|
||||
|
||||
GrallocTextureClientOGL::GrallocTextureClientOGL(MaybeMagicGrallocBufferHandle buffer,
|
||||
gfx::IntSize aSize,
|
||||
gfx::BackendType aMoz2dBackend,
|
||||
|
|
|
@ -60,8 +60,6 @@ public:
|
|||
|
||||
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual void SetReleaseFenceHandle(FenceHandle aReleaseFenceHandle) MOZ_OVERRIDE;
|
||||
|
||||
virtual void WaitReleaseFence() MOZ_OVERRIDE;
|
||||
|
|
|
@ -65,30 +65,5 @@ MacIOSurfaceTextureClientOGL::GetSize() const
|
|||
return gfx::IntSize(mSurface->GetDevicePixelWidth(), mSurface->GetDevicePixelHeight());
|
||||
}
|
||||
|
||||
class MacIOSurfaceTextureClientData : public TextureClientData
|
||||
{
|
||||
public:
|
||||
MacIOSurfaceTextureClientData(MacIOSurface* aSurface)
|
||||
: mSurface(aSurface)
|
||||
{}
|
||||
|
||||
virtual void DeallocateSharedData(ISurfaceAllocator*) MOZ_OVERRIDE
|
||||
{
|
||||
mSurface = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<MacIOSurface> mSurface;
|
||||
};
|
||||
|
||||
TextureClientData*
|
||||
MacIOSurfaceTextureClientOGL::DropTextureData()
|
||||
{
|
||||
TextureClientData* data = new MacIOSurfaceTextureClientData(mSurface);
|
||||
mSurface = nullptr;
|
||||
MarkInvalid();
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,6 @@ public:
|
|||
|
||||
virtual gfx::IntSize GetSize() const;
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return false; }
|
||||
|
||||
protected:
|
||||
|
@ -46,4 +44,4 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
#endif // MOZILLA_GFX_MACIOSURFACETEXTURECLIENTOGL_H
|
||||
#endif // MOZILLA_GFX_MACIOSURFACETEXTURECLIENTOGL_H
|
||||
|
|
|
@ -55,15 +55,6 @@ public:
|
|||
|
||||
virtual gfx::IntSize GetSize() const { return mSize; }
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE
|
||||
{
|
||||
// XXX - right now the code paths using this are managing the shared texture
|
||||
// data, although they should use a TextureClientData for this to ensure that
|
||||
// the destruction sequence is race-free.
|
||||
MarkInvalid();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE
|
||||
{
|
||||
return gfx::SurfaceFormat::UNKNOWN;
|
||||
|
@ -102,8 +93,6 @@ public:
|
|||
|
||||
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
||||
|
||||
virtual TextureClientData* DropTextureData() MOZ_OVERRIDE { return nullptr; }
|
||||
|
||||
virtual bool HasInternalBuffer() const MOZ_OVERRIDE { return false; }
|
||||
|
||||
void InitWith(gfx::SurfaceStream* aStream);
|
||||
|
|
|
@ -2093,7 +2093,7 @@ MOZ_CXX11
|
|||
dnl Check for .hidden assembler directive and visibility attribute.
|
||||
dnl Borrowed from glibc configure.in
|
||||
dnl ===============================================================
|
||||
if test "$GNU_CC"; then
|
||||
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
|
||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
||||
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
||||
if test -n "$gonkdir"; then
|
||||
|
|
|
@ -2,7 +2,7 @@ Modifications to upstream libffi needed for the Mozilla build:
|
|||
* Clear INFO_DEPS so that builds don't fail when makeinfo isn't present.
|
||||
- This can be removed if https://github.com/atgreen/libffi/issues/111 is fixed.
|
||||
* Various workarounds for pymake bugs.
|
||||
- Once pymake support is fully deprecated, hunks 2 & 3 be safely removed.
|
||||
- Once pymake support is fully deprecated, hunks 2-4 be safely removed.
|
||||
|
||||
diff --git a/js/src/ctypes/libffi/Makefile.in b/js/src/ctypes/libffi/Makefile.in
|
||||
--- a/js/src/ctypes/libffi/Makefile.in
|
||||
|
@ -26,7 +26,30 @@ diff --git a/js/src/ctypes/libffi/Makefile.in b/js/src/ctypes/libffi/Makefile.in
|
|||
TEXINFOS = doc/libffi.texi
|
||||
TEXI2DVI = texi2dvi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
@@ -1292,57 +1292,57 @@ distclean-compile:
|
||||
@@ -758,18 +758,20 @@ Makefile: $(srcdir)/Makefile.in $(top_bu
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
fficonfig.h: stamp-h1
|
||||
- @test -f $@ || rm -f stamp-h1
|
||||
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
+ @if test ! -f $@; then \
|
||||
+ rm -f stamp-h1; \
|
||||
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
+ else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status fficonfig.h
|
||||
$(srcdir)/fficonfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
@@ -1292,57 +1294,57 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/freebsd.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/sysv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/unix64.Plo@am__quote@
|
||||
|
@ -90,7 +113,7 @@ diff --git a/js/src/ctypes/libffi/Makefile.in b/js/src/ctypes/libffi/Makefile.in
|
|||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
@@ -1443,17 +1443,17 @@ doc/libffi.html: doc/libffi.texi $(srcdi
|
||||
@@ -1443,17 +1445,17 @@ doc/libffi.html: doc/libffi.texi $(srcdi
|
||||
-@rm -f vti.tmp
|
||||
@cp $(srcdir)/doc/version.texi $@
|
||||
|
||||
|
|
|
@ -763,8 +763,10 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
|||
$(am__aclocal_m4_deps):
|
||||
|
||||
fficonfig.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
|
|
|
@ -237,7 +237,7 @@ if (isAsmJSCompilationAvailable() && isCachingEnabled()) {
|
|||
|
||||
})();
|
||||
|
||||
/* Implicit "use strict" context */
|
||||
/* Implicit "use strict" context in modules */
|
||||
(function() {
|
||||
|
||||
var funcHeader = 'function (glob, ffi, heap) {',
|
||||
|
@ -336,3 +336,33 @@ if (isAsmJSCompilationAvailable() && isCachingEnabled()) {
|
|||
}
|
||||
|
||||
})();
|
||||
|
||||
/* Implicit "use strict" context in functions */
|
||||
(function () {
|
||||
|
||||
var funcCode = 'function g(x) {\n\
|
||||
x=x|0;\n\
|
||||
return x + 1 | 0;}';
|
||||
var moduleCode = 'function () {\n\
|
||||
"use asm";\n' + funcCode + '\n\
|
||||
return g;\n\
|
||||
}',
|
||||
useStrict = '"use strict";';
|
||||
|
||||
var f5 = eval(useStrict + ";\n(" + moduleCode + "())");
|
||||
|
||||
var expectedToString = funcCode.replace('{', '{\n' + useStrict + '\n')
|
||||
var expectedToSource = expectedToString
|
||||
|
||||
assertEq(f5.toString(), expectedToString);
|
||||
assertEq(f5.toSource(), expectedToSource);
|
||||
|
||||
if (isAsmJSCompilationAvailable() && isCachingEnabled()) {
|
||||
var mf5 = eval("\"use strict\";\n(" + moduleCode + ")");
|
||||
assertEq(isAsmJSModuleLoadedFromCache(mf5), true);
|
||||
var f5 = mf5();
|
||||
assertEq(f5.toString(), expectedToString);
|
||||
assertEq(f5.toSource(), expectedToSource);
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
@ -585,6 +585,7 @@ HandleDynamicLinkFailure(JSContext *cx, CallArgs args, AsmJSModule &module, Hand
|
|||
|
||||
CompileOptions options(cx);
|
||||
options.setOriginPrincipals(module.scriptSource()->originPrincipals())
|
||||
.setFile(module.scriptSource()->filename())
|
||||
.setCompileAndGo(false)
|
||||
.setNoScriptRval(false);
|
||||
|
||||
|
@ -860,6 +861,28 @@ js::IsAsmJSModule(HandleFunction fun)
|
|||
return fun->isNative() && fun->maybeNative() == LinkAsmJS;
|
||||
}
|
||||
|
||||
static bool
|
||||
AppendUseStrictSource(JSContext *cx, HandleFunction fun, Handle<JSFlatString*> src, StringBuffer &out)
|
||||
{
|
||||
// We need to add "use strict" in the body right after the opening
|
||||
// brace.
|
||||
size_t bodyStart = 0, bodyEnd;
|
||||
|
||||
// No need to test for functions created with the Function ctor as
|
||||
// these don't implicitly inherit the "use strict" context. Strict mode is
|
||||
// enabled for functions created with the Function ctor only if they begin with
|
||||
// the "use strict" directive, but these functions won't validate as asm.js
|
||||
// modules.
|
||||
|
||||
ConstTwoByteChars chars(src->chars(), src->length());
|
||||
if (!FindBody(cx, fun, chars, src->length(), &bodyStart, &bodyEnd))
|
||||
return false;
|
||||
|
||||
return out.append(chars, bodyStart) &&
|
||||
out.append("\n\"use strict\";\n") &&
|
||||
out.append(chars + bodyStart, src->length() - bodyStart);
|
||||
}
|
||||
|
||||
JSString *
|
||||
js::AsmJSModuleToString(JSContext *cx, HandleFunction fun, bool addParenToLambda)
|
||||
{
|
||||
|
@ -909,26 +932,8 @@ js::AsmJSModuleToString(JSContext *cx, HandleFunction fun, bool addParenToLambda
|
|||
return nullptr;
|
||||
|
||||
if (module.strict()) {
|
||||
// We need to add "use strict" in the body right after the opening
|
||||
// brace.
|
||||
size_t bodyStart = 0, bodyEnd;
|
||||
|
||||
// No need to test for functions created with the Function ctor as
|
||||
// these doesn't implicitly inherit the "use strict" context. Strict mode is
|
||||
// enabled for functions created with the Function ctor only if they begin with
|
||||
// the "use strict" directive, but these functions won't validate as asm.js
|
||||
// modules.
|
||||
|
||||
ConstTwoByteChars chars(src->chars(), src->length());
|
||||
if (!FindBody(cx, fun, chars, src->length(), &bodyStart, &bodyEnd))
|
||||
if (!AppendUseStrictSource(cx, fun, src, out))
|
||||
return nullptr;
|
||||
|
||||
if (!out.append(chars, bodyStart) ||
|
||||
!out.append("\n\"use strict\";\n") ||
|
||||
!out.append(chars + bodyStart, src->length() - bodyStart))
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
if (!out.append(src->chars(), src->length()))
|
||||
return nullptr;
|
||||
|
@ -995,12 +1000,27 @@ js::AsmJSFunctionToString(JSContext *cx, HandleFunction fun)
|
|||
if (!out.append("function "))
|
||||
return nullptr;
|
||||
|
||||
Rooted<JSFlatString*> src(cx, source->substring(cx, begin, end));
|
||||
if (!src)
|
||||
return nullptr;
|
||||
if (module.strict()) {
|
||||
// AppendUseStrictSource expects its input to start right after the
|
||||
// function name, so split the source chars from the src into two parts:
|
||||
// the function name and the rest (arguments + body).
|
||||
|
||||
if (!out.append(src->chars(), src->length()))
|
||||
return nullptr;
|
||||
// asm.js functions can't be anonymous
|
||||
JS_ASSERT(fun->atom());
|
||||
if (!out.append(fun->atom()))
|
||||
return nullptr;
|
||||
|
||||
size_t nameEnd = begin + fun->atom()->length();
|
||||
Rooted<JSFlatString*> src(cx, source->substring(cx, nameEnd, end));
|
||||
if (!AppendUseStrictSource(cx, fun, src, out))
|
||||
return nullptr;
|
||||
} else {
|
||||
Rooted<JSFlatString*> src(cx, source->substring(cx, begin, end));
|
||||
if (!src)
|
||||
return nullptr;
|
||||
if (!out.append(src->chars(), src->length()))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return out.finishString();
|
||||
}
|
||||
|
|
|
@ -1567,71 +1567,71 @@ GenerateLIR(MIRGenerator *mir)
|
|||
|
||||
AllocationIntegrityState integrity(*lir);
|
||||
|
||||
TraceLogStartEvent(logger, TraceLogger::RegisterAllocation);
|
||||
{
|
||||
AutoTraceLog log(logger, TraceLogger::RegisterAllocation);
|
||||
|
||||
switch (mir->optimizationInfo().registerAllocator()) {
|
||||
case RegisterAllocator_LSRA: {
|
||||
switch (mir->optimizationInfo().registerAllocator()) {
|
||||
case RegisterAllocator_LSRA: {
|
||||
#ifdef DEBUG
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
||||
break;
|
||||
}
|
||||
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
||||
break;
|
||||
}
|
||||
|
||||
case RegisterAllocator_Backtracking: {
|
||||
case RegisterAllocator_Backtracking: {
|
||||
#ifdef DEBUG
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
if (!integrity.check(false))
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
IonSpewPass("Allocate Registers [Backtracking]");
|
||||
break;
|
||||
}
|
||||
IonSpewPass("Allocate Registers [Backtracking]");
|
||||
break;
|
||||
}
|
||||
|
||||
case RegisterAllocator_Stupid: {
|
||||
// Use the integrity checker to populate safepoint information, so
|
||||
// run it in all builds.
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
case RegisterAllocator_Stupid: {
|
||||
// Use the integrity checker to populate safepoint information, so
|
||||
// run it in all builds.
|
||||
if (!integrity.record())
|
||||
return nullptr;
|
||||
|
||||
StupidAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
if (!integrity.check(true))
|
||||
return nullptr;
|
||||
IonSpewPass("Allocate Registers [Stupid]");
|
||||
break;
|
||||
}
|
||||
StupidAllocator regalloc(mir, &lirgen, *lir);
|
||||
if (!regalloc.go())
|
||||
return nullptr;
|
||||
if (!integrity.check(true))
|
||||
return nullptr;
|
||||
IonSpewPass("Allocate Registers [Stupid]");
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
||||
}
|
||||
|
||||
if (mir->shouldCancel("Allocate Registers"))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mir->shouldCancel("Allocate Registers"))
|
||||
return nullptr;
|
||||
|
||||
TraceLogStopEvent(logger, TraceLogger::RegisterAllocation);
|
||||
|
||||
{
|
||||
AutoTraceLog log(logger, TraceLogger::UnsplitEdges);
|
||||
// Now that all optimization and register allocation is done, re-introduce
|
||||
|
|
|
@ -87,7 +87,7 @@ JSString::validateLength(js::ThreadSafeContext *maybecx, size_t length)
|
|||
MOZ_ALWAYS_INLINE void
|
||||
JSRope::init(js::ThreadSafeContext *cx, JSString *left, JSString *right, size_t length)
|
||||
{
|
||||
d.lengthAndFlags = buildLengthAndFlags(length, ROPE_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length, ROPE_FLAGS);
|
||||
d.u1.left = left;
|
||||
d.s.u2.right = right;
|
||||
js::StringWriteBarrierPost(cx, &d.u1.left);
|
||||
|
@ -122,7 +122,7 @@ JSDependentString::init(js::ThreadSafeContext *cx, JSLinearString *base, const j
|
|||
size_t length)
|
||||
{
|
||||
JS_ASSERT(!js::IsPoisonedPtr(base));
|
||||
d.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS);
|
||||
d.u1.chars = chars;
|
||||
d.s.u2.base = base;
|
||||
js::StringWriteBarrierPost(cx, reinterpret_cast<JSString **>(&d.s.u2.base));
|
||||
|
@ -185,7 +185,7 @@ JSString::markBase(JSTracer *trc)
|
|||
MOZ_ALWAYS_INLINE void
|
||||
JSFlatString::init(const jschar *chars, size_t length)
|
||||
{
|
||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u1.chars = chars;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ JSInlineString::new_(js::ThreadSafeContext *cx)
|
|||
MOZ_ALWAYS_INLINE jschar *
|
||||
JSInlineString::init(size_t length)
|
||||
{
|
||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u1.chars = d.inlineStorage;
|
||||
JS_ASSERT(lengthFits(length) || (isFatInline() && JSFatInlineString::lengthFits(length)));
|
||||
return d.inlineStorage;
|
||||
|
@ -238,7 +238,7 @@ JSInlineString::init(size_t length)
|
|||
MOZ_ALWAYS_INLINE void
|
||||
JSInlineString::resetLength(size_t length)
|
||||
{
|
||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
JS_ASSERT(lengthFits(length) || (isFatInline() && JSFatInlineString::lengthFits(length)));
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ JSExternalString::init(const jschar *chars, size_t length, const JSStringFinaliz
|
|||
{
|
||||
JS_ASSERT(fin);
|
||||
JS_ASSERT(fin->finalize);
|
||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||
d.u1.chars = chars;
|
||||
d.s.u2.externalFinalizer = fin;
|
||||
}
|
||||
|
|
|
@ -231,8 +231,7 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
* To avoid maintaining a stack, tree nodes are mutated to indicate how many
|
||||
* times they have been visited. Since ropes can be dags, a node may be
|
||||
* encountered multiple times during traversal. However, step 3 above leaves
|
||||
* a valid dependent string, so everything works out. This algorithm is
|
||||
* homomorphic to marking code.
|
||||
* a valid dependent string, so everything works out.
|
||||
*
|
||||
* While ropes avoid all sorts of quadratic cases with string
|
||||
* concatenation, they can't help when ropes are immediately flattened.
|
||||
|
@ -260,6 +259,14 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
JSString *str = this;
|
||||
jschar *pos;
|
||||
|
||||
/*
|
||||
* JSString::flattenData is a tagged pointer to the parent node.
|
||||
* The tag indicates what to do when we return to the parent.
|
||||
*/
|
||||
static const uintptr_t Tag_Mask = 0x3;
|
||||
static const uintptr_t Tag_FinishNode = 0x0;
|
||||
static const uintptr_t Tag_VisitRightChild = 0x1;
|
||||
|
||||
/* Find the left most string, containing the first string. */
|
||||
JSRope *leftMostRope = this;
|
||||
while (leftMostRope->leftChild()->isRope())
|
||||
|
@ -273,16 +280,16 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
* Simulate a left-most traversal from the root to leftMost->leftChild()
|
||||
* via first_visit_node
|
||||
*/
|
||||
JS_ASSERT(str->isRope());
|
||||
while (str != leftMostRope) {
|
||||
JS_ASSERT(str->isRope());
|
||||
if (b == WithIncrementalBarrier) {
|
||||
JSString::writeBarrierPre(str->d.u1.left);
|
||||
JSString::writeBarrierPre(str->d.s.u2.right);
|
||||
}
|
||||
JSString *child = str->d.u1.left;
|
||||
JS_ASSERT(child->isRope());
|
||||
str->d.u1.chars = left.chars();
|
||||
child->d.s.u3.parent = str;
|
||||
child->d.lengthAndFlags = 0x200;
|
||||
child->d.u0.flattenData = uintptr_t(str) | Tag_VisitRightChild;
|
||||
str = child;
|
||||
}
|
||||
if (b == WithIncrementalBarrier) {
|
||||
|
@ -292,10 +299,10 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
str->d.u1.chars = left.chars();
|
||||
wholeCapacity = capacity;
|
||||
wholeChars = const_cast<jschar *>(left.chars());
|
||||
size_t bits = left.d.lengthAndFlags;
|
||||
size_t bits = left.d.u0.lengthAndFlags;
|
||||
pos = wholeChars + (bits >> LENGTH_SHIFT);
|
||||
JS_STATIC_ASSERT(!(EXTENSIBLE_FLAGS & DEPENDENT_FLAGS));
|
||||
left.d.lengthAndFlags = bits ^ (EXTENSIBLE_FLAGS | DEPENDENT_FLAGS);
|
||||
left.d.u0.lengthAndFlags = bits ^ (EXTENSIBLE_FLAGS | DEPENDENT_FLAGS);
|
||||
left.d.s.u2.base = (JSLinearString *)this; /* will be true on exit */
|
||||
StringWriteBarrierPostRemove(maybecx, &left.d.u1.left);
|
||||
StringWriteBarrierPost(maybecx, (JSString **)&left.d.s.u2.base);
|
||||
|
@ -317,8 +324,8 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
str->d.u1.chars = pos;
|
||||
StringWriteBarrierPostRemove(maybecx, &str->d.u1.left);
|
||||
if (left.isRope()) {
|
||||
left.d.s.u3.parent = str; /* Return to this when 'left' done, */
|
||||
left.d.lengthAndFlags = 0x200; /* but goto visit_right_child. */
|
||||
/* Return to this node when 'left' done, then goto visit_right_child. */
|
||||
left.d.u0.flattenData = uintptr_t(str) | Tag_VisitRightChild;
|
||||
str = &left;
|
||||
goto first_visit_node;
|
||||
}
|
||||
|
@ -329,8 +336,8 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
visit_right_child: {
|
||||
JSString &right = *str->d.s.u2.right;
|
||||
if (right.isRope()) {
|
||||
right.d.s.u3.parent = str; /* Return to this node when 'right' done, */
|
||||
right.d.lengthAndFlags = 0x300; /* but goto finish_node. */
|
||||
/* Return to this node when 'right' done, then goto finish_node. */
|
||||
right.d.u0.flattenData = uintptr_t(str) | Tag_FinishNode;
|
||||
str = &right;
|
||||
goto first_visit_node;
|
||||
}
|
||||
|
@ -342,21 +349,21 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||
if (str == this) {
|
||||
JS_ASSERT(pos == wholeChars + wholeLength);
|
||||
*pos = '\0';
|
||||
str->d.lengthAndFlags = buildLengthAndFlags(wholeLength, EXTENSIBLE_FLAGS);
|
||||
str->d.u0.lengthAndFlags = buildLengthAndFlags(wholeLength, EXTENSIBLE_FLAGS);
|
||||
str->d.u1.chars = wholeChars;
|
||||
str->d.s.u2.capacity = wholeCapacity;
|
||||
StringWriteBarrierPostRemove(maybecx, &str->d.u1.left);
|
||||
StringWriteBarrierPostRemove(maybecx, &str->d.s.u2.right);
|
||||
return &this->asFlat();
|
||||
}
|
||||
size_t progress = str->d.lengthAndFlags;
|
||||
str->d.lengthAndFlags = buildLengthAndFlags(pos - str->d.u1.chars, DEPENDENT_FLAGS);
|
||||
uintptr_t flattenData = str->d.u0.flattenData;
|
||||
str->d.u0.lengthAndFlags = buildLengthAndFlags(pos - str->d.u1.chars, DEPENDENT_FLAGS);
|
||||
str->d.s.u2.base = (JSLinearString *)this; /* will be true on exit */
|
||||
StringWriteBarrierPost(maybecx, (JSString **)&str->d.s.u2.base);
|
||||
str = str->d.s.u3.parent;
|
||||
if (progress == 0x200)
|
||||
str = (JSString *)(flattenData & ~Tag_Mask);
|
||||
if ((flattenData & Tag_Mask) == Tag_VisitRightChild)
|
||||
goto visit_right_child;
|
||||
JS_ASSERT(progress == 0x300);
|
||||
JS_ASSERT((flattenData & Tag_Mask) == Tag_FinishNode);
|
||||
goto finish_node;
|
||||
}
|
||||
}
|
||||
|
@ -465,7 +472,7 @@ JSDependentString::undepend(ExclusiveContext *cx)
|
|||
* Transform *this into an undepended string so 'base' will remain rooted
|
||||
* for the benefit of any other dependent string that depends on *this.
|
||||
*/
|
||||
d.lengthAndFlags = buildLengthAndFlags(n, UNDEPENDED_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(n, UNDEPENDED_FLAGS);
|
||||
|
||||
return &this->asFlat();
|
||||
}
|
||||
|
|
|
@ -136,7 +136,10 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
/* Fields only apply to string types commented on the right. */
|
||||
struct Data
|
||||
{
|
||||
size_t lengthAndFlags; /* JSString */
|
||||
union {
|
||||
size_t lengthAndFlags; /* JSString */
|
||||
uintptr_t flattenData; /* JSRope (temporary while flattening) */
|
||||
} u0;
|
||||
union {
|
||||
const jschar *chars; /* JSLinearString */
|
||||
JSString *left; /* JSRope */
|
||||
|
@ -150,10 +153,6 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
size_t capacity; /* JSFlatString (extensible) */
|
||||
const JSStringFinalizer *externalFinalizer;/* JSExternalString */
|
||||
} u2;
|
||||
union {
|
||||
JSString *parent; /* JSRope (temporary) */
|
||||
size_t reserved; /* may use for bug 615290 */
|
||||
} u3;
|
||||
} s;
|
||||
};
|
||||
} d;
|
||||
|
@ -252,12 +251,12 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
|
||||
MOZ_ALWAYS_INLINE
|
||||
size_t length() const {
|
||||
return d.lengthAndFlags >> LENGTH_SHIFT;
|
||||
return d.u0.lengthAndFlags >> LENGTH_SHIFT;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool empty() const {
|
||||
return d.lengthAndFlags <= FLAGS_MASK;
|
||||
return d.u0.lengthAndFlags <= FLAGS_MASK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -299,7 +298,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isRope() const {
|
||||
return (d.lengthAndFlags & FLAGS_MASK) == ROPE_FLAGS;
|
||||
return (d.u0.lengthAndFlags & FLAGS_MASK) == ROPE_FLAGS;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
|
@ -321,7 +320,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isDependent() const {
|
||||
return (d.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS;
|
||||
return (d.u0.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
|
@ -343,7 +342,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isExtensible() const {
|
||||
return (d.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS;
|
||||
return (d.u0.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
|
@ -376,17 +375,17 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isUndepended() const {
|
||||
return (d.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS;
|
||||
return (d.u0.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isAtom() const {
|
||||
return d.lengthAndFlags & ATOM_BIT;
|
||||
return d.u0.lengthAndFlags & ATOM_BIT;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isPermanentAtom() const {
|
||||
return (d.lengthAndFlags & FLAGS_MASK) == PERMANENT_ATOM_FLAGS;
|
||||
return (d.u0.lengthAndFlags & FLAGS_MASK) == PERMANENT_ATOM_FLAGS;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE
|
||||
|
@ -399,7 +398,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
|
||||
inline bool hasBase() const {
|
||||
JS_STATIC_ASSERT((DEPENDENT_FLAGS | JS_BIT(1)) == UNDEPENDED_FLAGS);
|
||||
return d.lengthAndFlags & HAS_BASE_BIT;
|
||||
return d.u0.lengthAndFlags & HAS_BASE_BIT;
|
||||
}
|
||||
|
||||
inline JSLinearString *base() const;
|
||||
|
@ -417,7 +416,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||
/* Offsets for direct field from jit code. */
|
||||
|
||||
static size_t offsetOfLengthAndFlags() {
|
||||
return offsetof(JSString, d.lengthAndFlags);
|
||||
return offsetof(JSString, d.u0.lengthAndFlags);
|
||||
}
|
||||
|
||||
static size_t offsetOfChars() {
|
||||
|
@ -594,11 +593,11 @@ class JSFlatString : public JSLinearString
|
|||
* operation changes the string to the JSAtom type, in place.
|
||||
*/
|
||||
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoAtom() {
|
||||
d.lengthAndFlags = buildLengthAndFlags(length(), ATOM_BIT);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length(), ATOM_BIT);
|
||||
return &asAtom();
|
||||
}
|
||||
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoPermanentAtom() {
|
||||
d.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
||||
return &asAtom();
|
||||
}
|
||||
|
||||
|
@ -740,13 +739,13 @@ class JSAtom : public JSFlatString
|
|||
|
||||
MOZ_ALWAYS_INLINE
|
||||
bool isPermanent() const {
|
||||
return d.lengthAndFlags & PERMANENT_BIT;
|
||||
return d.u0.lengthAndFlags & PERMANENT_BIT;
|
||||
}
|
||||
|
||||
// Transform this atom into a permanent atom. This is only done during
|
||||
// initialization of the runtime.
|
||||
MOZ_ALWAYS_INLINE void morphIntoPermanentAtom() {
|
||||
d.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
||||
d.u0.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: test button "disabled" text style</title>
|
||||
<style>
|
||||
button {
|
||||
color: GrayText;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button>Some text</button>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: test button "disabled" text style</title>
|
||||
<style>
|
||||
button {
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button disabled>Some text</button>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: test all types of buttons look similar when disabled</title>
|
||||
</head>
|
||||
<body>
|
||||
<button>Some text</button>
|
||||
<button>Some text</button>
|
||||
<button>Reset</button>
|
||||
<button>Submit Query</button>
|
||||
<br>
|
||||
<button disabled>Some text</button>
|
||||
<button disabled>Some text</button>
|
||||
<button disabled>Reset</button>
|
||||
<button disabled>Submit Query</button>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: test all types of buttons look similar when disabled</title>
|
||||
</head>
|
||||
<body>
|
||||
<button>Some text</button>
|
||||
<input type="button" value="Some text">
|
||||
<input type="reset">
|
||||
<input type="submit">
|
||||
<br>
|
||||
<button disabled>Some text</button>
|
||||
<input disabled type="button" value="Some text">
|
||||
<input disabled type="reset">
|
||||
<input disabled type="submit">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<button disabled>Some text</button>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<button>Some text</button>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<input disabled type="button" value="Some text">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<input type="button" value="Some text">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<input disabled type="reset">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<input type="reset">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<input disabled type="submit">
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||
</head>
|
||||
<body>
|
||||
<input type="submit">
|
||||
</body>
|
||||
</html>
|
|
@ -17,3 +17,15 @@ fuzzy-if(B2G||Android,125,80) == percent-width-child-2.html percent-width-child
|
|||
!= line-height-button-1.5.html line-height-button-1.0.html
|
||||
!= line-height-input-0.5.html line-height-input-1.0.html
|
||||
!= line-height-input-1.5.html line-height-input-1.0.html
|
||||
|
||||
# Looks like Android and B2G change the text color, but to something slightly
|
||||
# different from ColorGray
|
||||
fails-if(Android||B2G) == disabled-1.html disabled-1-ref.html
|
||||
# While disabled buttons don't look like non-disabled buttons, <button disabled>
|
||||
# is different from other disabled buttons for B2G ICS Emulator (see bug 1009714)
|
||||
fails-if(B2G) == disabled-2.html disabled-2-ref.html
|
||||
|
||||
!= disabled-3.html disabled-3-notref.html
|
||||
!= disabled-4.html disabled-4-notref.html
|
||||
!= disabled-5.html disabled-5-notref.html
|
||||
!= disabled-6.html disabled-6-notref.html
|
||||
|
|
|
@ -664,6 +664,7 @@ input[type="submit"]:disabled {
|
|||
cursor: inherit;
|
||||
}
|
||||
|
||||
button:disabled:active, button:disabled,
|
||||
input[type="reset"]:disabled:active,
|
||||
input[type="reset"]:disabled,
|
||||
input[type="button"]:disabled:active,
|
||||
|
|
2
mach
2
mach
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python2.7
|
||||
#!/usr/bin/env python
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
|
|
@ -126,6 +126,19 @@ Http2Session::Http2Session(nsAHttpTransaction *aHttpTransaction,
|
|||
mPingThreshold = gHttpHandler->SpdyPingThreshold();
|
||||
}
|
||||
|
||||
// Copy the 32 bit number into the destination, using network byte order
|
||||
// in the destination.
|
||||
template<typename charType> static void
|
||||
CopyAsNetwork32(charType dest, // where to store it
|
||||
uint32_t number) // the 32 bit number in native format
|
||||
{
|
||||
number = PR_htonl(number);
|
||||
memcpy(dest, &number, sizeof(number));
|
||||
}
|
||||
|
||||
template void CopyAsNetwork32(char *dest, uint32_t number);
|
||||
template void CopyAsNetwork32(uint8_t *dest, uint32_t number);
|
||||
|
||||
PLDHashOperator
|
||||
Http2Session::ShutdownEnumerator(nsAHttpTransaction *key,
|
||||
nsAutoPtr<Http2Stream> &stream,
|
||||
|
@ -601,12 +614,11 @@ Http2Session::CreateFrameHeader(charType dest, uint16_t frameLength,
|
|||
MOZ_ASSERT(!(streamID & 0x80000000));
|
||||
|
||||
frameLength = PR_htons(frameLength);
|
||||
streamID = PR_htonl(streamID);
|
||||
|
||||
memcpy(dest, &frameLength, 2);
|
||||
dest[2] = frameType;
|
||||
dest[3] = frameFlags;
|
||||
memcpy(dest + 4, &streamID, 4);
|
||||
CopyAsNetwork32(dest + 4, streamID);
|
||||
}
|
||||
|
||||
char *
|
||||
|
@ -710,7 +722,7 @@ Http2Session::GeneratePriority(uint32_t aID, uint8_t aPriorityWeight)
|
|||
mOutputQueueUsed += 13;
|
||||
|
||||
CreateFrameHeader(packet, 5, FRAME_TYPE_PRIORITY, 0, aID);
|
||||
memset(packet + 8, 0, 4);
|
||||
CopyAsNetwork32(packet + 8, 0);
|
||||
memcpy(packet + 12, &aPriorityWeight, 1);
|
||||
LogIO(this, nullptr, "Generate Priority", packet, 13);
|
||||
FlushOutputQueue();
|
||||
|
@ -736,8 +748,7 @@ Http2Session::GenerateRstStream(uint32_t aStatusCode, uint32_t aID)
|
|||
mOutputQueueUsed += 12;
|
||||
CreateFrameHeader(packet, 4, FRAME_TYPE_RST_STREAM, 0, aID);
|
||||
|
||||
aStatusCode = PR_htonl(aStatusCode);
|
||||
memcpy(packet + 8, &aStatusCode, 4);
|
||||
CopyAsNetwork32(packet + 8, aStatusCode);
|
||||
|
||||
LogIO(this, nullptr, "Generate Reset", packet, 12);
|
||||
FlushOutputQueue();
|
||||
|
@ -755,12 +766,10 @@ Http2Session::GenerateGoAway(uint32_t aStatusCode)
|
|||
CreateFrameHeader(packet, 8, FRAME_TYPE_GOAWAY, 0, 0);
|
||||
|
||||
// last-good-stream-id are bytes 8-11 reflecting pushes
|
||||
uint32_t goAway = PR_htonl(mOutgoingGoAwayID);
|
||||
memcpy(packet + 8, &goAway, 4);
|
||||
CopyAsNetwork32(packet + 8, mOutgoingGoAwayID);
|
||||
|
||||
// bytes 12-15 are the status code.
|
||||
aStatusCode = PR_htonl(aStatusCode);
|
||||
memcpy(packet + 12, &aStatusCode, 4);
|
||||
CopyAsNetwork32(packet + 12, aStatusCode);
|
||||
|
||||
LogIO(this, nullptr, "Generate GoAway", packet, 16);
|
||||
FlushOutputQueue();
|
||||
|
@ -812,8 +821,7 @@ Http2Session::SendHello()
|
|||
// Advertise the Push RWIN for the session, and on each new pull stream
|
||||
// send a window update with END_FLOW_CONTROL
|
||||
packet[8 + 5 * numberOfEntries] = SETTINGS_TYPE_INITIAL_WINDOW;
|
||||
uint32_t rwin = PR_htonl(mPushAllowance);
|
||||
memcpy(packet + 9 + 5 * numberOfEntries, &rwin, 4);
|
||||
CopyAsNetwork32(packet + 9 + 5 * numberOfEntries, mPushAllowance);
|
||||
numberOfEntries++;
|
||||
|
||||
// Explicitly signal that we do NOT support compressed data frames, even
|
||||
|
@ -835,16 +843,15 @@ Http2Session::SendHello()
|
|||
goto sendHello_complete;
|
||||
|
||||
// send a window update for the session (Stream 0) for something large
|
||||
sessionWindowBump = PR_htonl(sessionWindowBump);
|
||||
mLocalSessionWindow = ASpdySession::kInitialRwin;
|
||||
|
||||
packet = mOutputQueueBuffer.get() + mOutputQueueUsed;
|
||||
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0);
|
||||
mOutputQueueUsed += 12;
|
||||
memcpy(packet + 8, &sessionWindowBump, 4);
|
||||
CopyAsNetwork32(packet + 8, sessionWindowBump);
|
||||
|
||||
LOG3(("Session Window increase at start of session %p %u\n",
|
||||
this, PR_ntohl(sessionWindowBump)));
|
||||
this, sessionWindowBump));
|
||||
LogIO(this, nullptr, "Session Window Bump ", packet, 12);
|
||||
|
||||
sendHello_complete:
|
||||
|
@ -2480,8 +2487,7 @@ Http2Session::UpdateLocalStreamWindow(Http2Stream *stream, uint32_t bytes)
|
|||
MOZ_ASSERT(mOutputQueueUsed <= mOutputQueueSize);
|
||||
|
||||
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, stream->StreamID());
|
||||
toack = PR_htonl(toack);
|
||||
memcpy(packet + 8, &toack, 4);
|
||||
CopyAsNetwork32(packet + 8, toack);
|
||||
|
||||
LogIO(this, stream, "Stream Window Update", packet, 12);
|
||||
// dont flush here, this write can commonly be coalesced with a
|
||||
|
@ -2519,8 +2525,7 @@ Http2Session::UpdateLocalSessionWindow(uint32_t bytes)
|
|||
MOZ_ASSERT(mOutputQueueUsed <= mOutputQueueSize);
|
||||
|
||||
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0);
|
||||
toack = PR_htonl(toack);
|
||||
memcpy(packet + 8, &toack, 4);
|
||||
CopyAsNetwork32(packet + 8, toack);
|
||||
|
||||
LogIO(this, nullptr, "Session Window Update", packet, 12);
|
||||
// dont flush here, this write can commonly be coalesced with others
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2012 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# Copyright 2013 Mozilla Foundation
|
||||
# This code is made available to you under your choice of the following sets
|
||||
# of licensing terms:
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# Copyright 2013 Mozilla Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* Copyright 2013 Mozilla Foundation
|
||||
/* This code is made available to you under your choice of the following sets
|
||||
* of licensing terms:
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
/* Copyright 2013 Mozilla Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче