mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 20:55:39 +00:00
Merge m-c to fx-team.
This commit is contained in:
commit
b80adb9b88
@ -1,3 +1,3 @@
|
||||
\mfbt/
|
||||
\js/
|
||||
\media/
|
||||
^mfbt/.*
|
||||
^js/.*
|
||||
^media/.*
|
||||
|
@ -12,7 +12,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -11,7 +11,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="e33ea242b4328fb0d1824c951f379332b5021512"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="788d9ce293a9b44f64536130cf4ad577e8101dbe"/>
|
||||
|
@ -12,7 +12,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "34a411a6261587124fc6746fb18a19c05571437a",
|
||||
"revision": "e11cf4c78874de3469c4f338cf275aeae31854ee",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -11,7 +11,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -10,7 +10,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -12,7 +12,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="e33ea242b4328fb0d1824c951f379332b5021512"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="788d9ce293a9b44f64536130cf4ad577e8101dbe"/>
|
||||
|
@ -11,7 +11,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="3fc26ae786e3869a7ef1e23afc9807ac1b4741f2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="260effa7f342db418b8d5a95dc61c6e8dd8d09f4"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -244,16 +244,43 @@ OpusTrackEncoder::GetMetadata()
|
||||
nsresult
|
||||
OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
{
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
|
||||
// Wait until initialized or cancelled.
|
||||
while (!mCanceled && !mInitialized) {
|
||||
mReentrantMonitor.Wait();
|
||||
}
|
||||
if (mCanceled || mEncodingComplete) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
// calculation below depends on the truth that mInitialized is true.
|
||||
MOZ_ASSERT(mInitialized);
|
||||
|
||||
// re-sampled frames left last time which didn't fit into an Opus packet duration.
|
||||
const int framesLeft = mResampledLeftover.Length() / mChannels;
|
||||
// When framesLeft is 0, (GetPacketDuration() - framesLeft) is a multiple
|
||||
// of kOpusSamplingRate. There is not precision loss in the integer division
|
||||
// in computing framesToFetch. If frameLeft > 0, we need to add 1 to
|
||||
// framesToFetch to ensure there will be at least n frames after re-sampling.
|
||||
const int frameRoundUp = framesLeft ? 1 : 0;
|
||||
|
||||
MOZ_ASSERT(GetPacketDuration() >= framesLeft);
|
||||
// Try to fetch m frames such that there will be n frames
|
||||
// where (n + frameLeft) >= GetPacketDuration() after re-sampling.
|
||||
const int framesToFetch = !mResampler ? GetPacketDuration()
|
||||
: (GetPacketDuration() - framesLeft) * mSamplingRate / kOpusSamplingRate
|
||||
+ frameRoundUp;
|
||||
{
|
||||
// Move all the samples from mRawSegment to mSourceSegment. We only hold
|
||||
// the monitor in this block.
|
||||
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
|
||||
|
||||
// Wait if mEncoder is not initialized, or when not enough raw data, but is
|
||||
// not the end of stream nor is being canceled.
|
||||
while (!mCanceled && (!mInitialized || (mRawSegment.GetDuration() +
|
||||
mSourceSegment.GetDuration() < GetPacketDuration() &&
|
||||
!mEndOfStream))) {
|
||||
// Wait until enough raw data, end of stream or cancelled.
|
||||
while (!mCanceled && mRawSegment.GetDuration() +
|
||||
mSourceSegment.GetDuration() < framesToFetch &&
|
||||
!mEndOfStream) {
|
||||
mReentrantMonitor.Wait();
|
||||
}
|
||||
|
||||
@ -276,13 +303,14 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
pcm.SetLength(GetPacketDuration() * mChannels);
|
||||
AudioSegment::ChunkIterator iter(mSourceSegment);
|
||||
int frameCopied = 0;
|
||||
while (!iter.IsEnded() && frameCopied < GetPacketDuration()) {
|
||||
|
||||
while (!iter.IsEnded() && frameCopied < framesToFetch) {
|
||||
AudioChunk chunk = *iter;
|
||||
|
||||
// Chunk to the required frame size.
|
||||
int frameToCopy = chunk.GetDuration();
|
||||
if (frameCopied + frameToCopy > GetPacketDuration()) {
|
||||
frameToCopy = GetPacketDuration() - frameCopied;
|
||||
if (frameCopied + frameToCopy > framesToFetch) {
|
||||
frameToCopy = framesToFetch - frameCopied;
|
||||
}
|
||||
|
||||
if (!chunk.IsNull()) {
|
||||
@ -300,6 +328,7 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
|
||||
nsRefPtr<EncodedFrame> audiodata = new EncodedFrame();
|
||||
audiodata->SetFrameType(EncodedFrame::AUDIO_FRAME);
|
||||
int framesInPCM = frameCopied;
|
||||
if (mResampler) {
|
||||
nsAutoTArray<AudioDataValue, 9600> resamplingDest;
|
||||
// We want to consume all the input data, so we slightly oversize the
|
||||
@ -322,9 +351,25 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
out, &outframes);
|
||||
#endif
|
||||
|
||||
pcm = resamplingDest;
|
||||
MOZ_ASSERT(pcm.Length() >= mResampledLeftover.Length());
|
||||
PodCopy(pcm.Elements(), mResampledLeftover.Elements(),
|
||||
mResampledLeftover.Length());
|
||||
|
||||
uint32_t outframesToCopy = std::min(outframes,
|
||||
static_cast<uint32_t>(GetPacketDuration() - framesLeft));
|
||||
|
||||
MOZ_ASSERT(pcm.Length() - mResampledLeftover.Length() >=
|
||||
outframesToCopy * mChannels);
|
||||
PodCopy(pcm.Elements() + mResampledLeftover.Length(),
|
||||
resamplingDest.Elements(), outframesToCopy * mChannels);
|
||||
int frameLeftover = outframes - outframesToCopy;
|
||||
mResampledLeftover.SetLength(frameLeftover * mChannels);
|
||||
PodCopy(mResampledLeftover.Elements(),
|
||||
resamplingDest.Elements() + outframesToCopy * mChannels,
|
||||
mResampledLeftover.Length());
|
||||
// This is always at 48000Hz.
|
||||
audiodata->SetDuration(outframes);
|
||||
framesInPCM = framesLeft + outframesToCopy;
|
||||
audiodata->SetDuration(framesInPCM);
|
||||
} else {
|
||||
// The ogg time stamping and pre-skip is always timed at 48000.
|
||||
audiodata->SetDuration(frameCopied * (kOpusSamplingRate / mSamplingRate));
|
||||
@ -342,11 +387,13 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
LOG("[Opus] Done encoding.");
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mEndOfStream || framesInPCM == GetPacketDuration());
|
||||
|
||||
// Append null data to pcm buffer if the leftover data is not enough for
|
||||
// opus encoder.
|
||||
if (frameCopied < GetPacketDuration() && mEndOfStream) {
|
||||
memset(pcm.Elements() + frameCopied * mChannels, 0,
|
||||
(GetPacketDuration()-frameCopied)*mChannels*sizeof(AudioDataValue));
|
||||
if (framesInPCM < GetPacketDuration() && mEndOfStream) {
|
||||
PodZero(pcm.Elements() + framesInPCM * mChannels,
|
||||
(GetPacketDuration() - framesInPCM) * mChannels);
|
||||
}
|
||||
nsTArray<uint8_t> frameData;
|
||||
// Encode the data with Opus Encoder.
|
||||
@ -372,6 +419,7 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
speex_resampler_destroy(mResampler);
|
||||
mResampler = nullptr;
|
||||
}
|
||||
mResampledLeftover.SetLength(0);
|
||||
}
|
||||
|
||||
audiodata->SwapInFrameData(frameData);
|
||||
|
@ -74,6 +74,12 @@ private:
|
||||
* resampled.
|
||||
*/
|
||||
SpeexResamplerState* mResampler;
|
||||
|
||||
/**
|
||||
* Store the resampled frames that don't fit into an Opus packet duration.
|
||||
* They will be prepended to the resampled frames next encoding cycle.
|
||||
*/
|
||||
nsTArray<AudioDataValue> mResampledLeftover;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ MP4Reader::Decode(TrackType aTrack)
|
||||
(data.mNumSamplesInput - data.mNumSamplesOutput) < data.mDecodeAhead)) {
|
||||
data.mMonitor.AssertCurrentThreadOwns();
|
||||
data.mMonitor.Unlock();
|
||||
nsAutoPtr<MP4Sample> compressed = PopSample(aTrack);
|
||||
nsAutoPtr<MP4Sample> compressed(PopSample(aTrack));
|
||||
if (!compressed) {
|
||||
// EOS, or error. Let the state machine know there are no more
|
||||
// frames coming.
|
||||
|
@ -1799,6 +1799,7 @@ Navigator::HasIccManagerSupport(JSContext* /* unused */,
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
|
||||
return win && CheckPermission(win, "mobileconnection");
|
||||
}
|
||||
#endif // MOZ_B2G_RIL
|
||||
|
||||
/* static */
|
||||
bool
|
||||
@ -1819,7 +1820,6 @@ Navigator::HasWifiManagerSupport(JSContext* /* unused */,
|
||||
permMgr->TestPermissionFromPrincipal(principal, "wifi-manage", &permission);
|
||||
return nsIPermissionManager::ALLOW_ACTION == permission;
|
||||
}
|
||||
#endif // MOZ_B2G_RIL
|
||||
|
||||
#ifdef MOZ_B2G_BT
|
||||
/* static */
|
||||
|
@ -264,9 +264,9 @@ public:
|
||||
JSObject* aGlobal);
|
||||
static bool HasIccManagerSupport(JSContext* /* unused */,
|
||||
JSObject* aGlobal);
|
||||
static bool HasWifiManagerSupport(JSContext* /* unused */,
|
||||
JSObject* aGlobal);
|
||||
#endif // MOZ_B2G_RIL
|
||||
static bool HasWifiManagerSupport(JSContext* /* unused */,
|
||||
JSObject* aGlobal);
|
||||
#ifdef MOZ_B2G_BT
|
||||
static bool HasBluetoothSupport(JSContext* /* unused */, JSObject* aGlobal);
|
||||
#endif // MOZ_B2G_BT
|
||||
|
@ -7005,7 +7005,7 @@ NS_IMETHODIMP
|
||||
nsGlobalWindow::ClearInterval(int32_t aHandle)
|
||||
{
|
||||
ErrorResult rv;
|
||||
ClearTimeoutOrInterval(aHandle, rv);
|
||||
ClearInterval(aHandle, rv);
|
||||
|
||||
return rv.ErrorCode();
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ int32_t PointerEvent::Height()
|
||||
return mEvent->AsPointerEvent()->height;
|
||||
}
|
||||
|
||||
int32_t PointerEvent::Pressure()
|
||||
float PointerEvent::Pressure()
|
||||
{
|
||||
return mEvent->AsPointerEvent()->pressure;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
int32_t PointerId();
|
||||
int32_t Width();
|
||||
int32_t Height();
|
||||
int32_t Pressure();
|
||||
float Pressure();
|
||||
int32_t TiltX();
|
||||
int32_t TiltY();
|
||||
bool IsPrimary();
|
||||
|
@ -971,6 +971,13 @@ ParticularProcessPriorityManager::SetPriorityNow(ProcessPriority aPriority,
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
// Do not attempt to change the priority of the Nuwa process
|
||||
if (mContentParent->IsNuwaProcess()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aBackgroundLRU > 0 &&
|
||||
aPriority == PROCESS_PRIORITY_BACKGROUND &&
|
||||
mPriority == PROCESS_PRIORITY_BACKGROUND) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3811,37 +3811,39 @@ let RIL = {
|
||||
debug("handle supp svc notification: " + JSON.stringify(info));
|
||||
}
|
||||
|
||||
if (info.notificationType !== 1) {
|
||||
// We haven't supported MO intermediate result code, i.e.
|
||||
// info.notificationType === 0, which refers to code1 defined in 3GPP
|
||||
// 27.007 7.17. We only support partial MT unsolicited result code,
|
||||
// referring to code2, for now.
|
||||
return;
|
||||
}
|
||||
|
||||
let notification = null;
|
||||
let callIndex = -1;
|
||||
|
||||
if (info.notificationType === 0) {
|
||||
// MO intermediate result code. Refer to code1 defined in 3GPP 27.007
|
||||
// 7.17.
|
||||
} else if (info.notificationType === 1) {
|
||||
// MT unsolicited result code. Refer to code2 defined in 3GPP 27.007 7.17.
|
||||
switch (info.code) {
|
||||
case SUPP_SVC_NOTIFICATION_CODE2_PUT_ON_HOLD:
|
||||
case SUPP_SVC_NOTIFICATION_CODE2_RETRIEVED:
|
||||
notification = GECKO_SUPP_SVC_NOTIFICATION_FROM_CODE2[info.code];
|
||||
break;
|
||||
default:
|
||||
// Notification type not supported.
|
||||
return;
|
||||
}
|
||||
switch (info.code) {
|
||||
case SUPP_SVC_NOTIFICATION_CODE2_PUT_ON_HOLD:
|
||||
case SUPP_SVC_NOTIFICATION_CODE2_RETRIEVED:
|
||||
notification = GECKO_SUPP_SVC_NOTIFICATION_FROM_CODE2[info.code];
|
||||
break;
|
||||
default:
|
||||
// Notification type not supported.
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the target call object for this notification.
|
||||
let currentCallIndexes = Object.keys(this.currentCalls);
|
||||
if (currentCallIndexes.length === 1) {
|
||||
// Only one call exists. This should be the target.
|
||||
callIndex = currentCallIndexes[0];
|
||||
} else {
|
||||
// Find the call in |currentCalls| by the given number.
|
||||
if (info.number) {
|
||||
for each (let currentCall in this.currentCalls) {
|
||||
if (currentCall.number == info.number) {
|
||||
callIndex = currentCall.callIndex;
|
||||
break;
|
||||
}
|
||||
// Get the target call object for this notification.
|
||||
let currentCallIndexes = Object.keys(this.currentCalls);
|
||||
if (currentCallIndexes.length === 1) {
|
||||
// Only one call exists. This should be the target.
|
||||
callIndex = currentCallIndexes[0];
|
||||
} else {
|
||||
// Find the call in |currentCalls| by the given number.
|
||||
if (info.number) {
|
||||
for each (let currentCall in this.currentCalls) {
|
||||
if (currentCall.number == info.number) {
|
||||
callIndex = currentCall.callIndex;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,10 @@ TelephonyProvider.prototype = {
|
||||
case RIL.GECKO_SUPP_SVC_NOTIFICATION_REMOTE_RESUMED:
|
||||
return nsITelephonyProvider.NOTIFICATION_REMOTE_RESUMED;
|
||||
default:
|
||||
throw new Error("Unknown rilSuppSvcNotification: " + aNotification);
|
||||
if (DEBUG) {
|
||||
debug("Unknown rilSuppSvcNotification: " + aNotification);
|
||||
}
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -382,9 +382,12 @@ inline void ApplyMorphologyHorizontal_SIMD(uint8_t* aSourceData, int32_t aSource
|
||||
MOZ_ASSERT(completeKernelSizeForFourPixels % 4 == 0 ||
|
||||
completeKernelSizeForFourPixels % 4 == 2);
|
||||
|
||||
// aSourceData[0] and aDestData[-aRadius] are both aligned to 16 bytes, just
|
||||
// aSourceData[-aRadius] and aDestData[0] are both aligned to 16 bytes, just
|
||||
// the way we need them to be.
|
||||
|
||||
IntRect sourceRect = aDestRect;
|
||||
sourceRect.Inflate(aRadius, 0);
|
||||
|
||||
for (int32_t y = aDestRect.y; y < aDestRect.YMost(); y++) {
|
||||
int32_t kernelStartX = aDestRect.x - aRadius;
|
||||
for (int32_t x = aDestRect.x; x < aDestRect.XMost(); x += 4, kernelStartX += 4) {
|
||||
@ -398,7 +401,9 @@ inline void ApplyMorphologyHorizontal_SIMD(uint8_t* aSourceData, int32_t aSource
|
||||
u8x16_t m1234 = p1234;
|
||||
|
||||
for (int32_t i = 4; i < completeKernelSizeForFourPixels; i += 4) {
|
||||
u8x16_t p5678 = simd::Load8<u8x16_t>(&aSourceData[sourceIndex + 4 * i]);
|
||||
u8x16_t p5678 = (kernelStartX + i < sourceRect.XMost()) ?
|
||||
simd::Load8<u8x16_t>(&aSourceData[sourceIndex + 4 * i]) :
|
||||
simd::FromZero8<u8x16_t>();
|
||||
u8x16_t p2345 = simd::Rotate8<4>(p1234, p5678);
|
||||
u8x16_t p3456 = simd::Rotate8<8>(p1234, p5678);
|
||||
m1234 = Morph8<op,u8x16_t>(m1234, p2345);
|
||||
|
@ -26,7 +26,7 @@ struct IntPointTyped :
|
||||
public units {
|
||||
typedef BasePoint< int32_t, IntPointTyped<units> > Super;
|
||||
|
||||
IntPointTyped() : Super() {}
|
||||
MOZ_CONSTEXPR IntPointTyped() : Super() {}
|
||||
MOZ_CONSTEXPR IntPointTyped(int32_t aX, int32_t aY) : Super(aX, aY) {}
|
||||
|
||||
// XXX When all of the code is ported, the following functions to convert to and from
|
||||
@ -48,9 +48,9 @@ struct PointTyped :
|
||||
public units {
|
||||
typedef BasePoint< Float, PointTyped<units> > Super;
|
||||
|
||||
PointTyped() : Super() {}
|
||||
PointTyped(Float aX, Float aY) : Super(aX, aY) {}
|
||||
PointTyped(const IntPointTyped<units>& point) : Super(float(point.x), float(point.y)) {}
|
||||
MOZ_CONSTEXPR PointTyped() : Super() {}
|
||||
MOZ_CONSTEXPR PointTyped(Float aX, Float aY) : Super(aX, aY) {}
|
||||
MOZ_CONSTEXPR PointTyped(const IntPointTyped<units>& point) : Super(float(point.x), float(point.y)) {}
|
||||
|
||||
// XXX When all of the code is ported, the following functions to convert to and from
|
||||
// unknown types should be removed.
|
||||
@ -120,8 +120,8 @@ struct SizeTyped :
|
||||
public units {
|
||||
typedef BaseSize< Float, SizeTyped<units> > Super;
|
||||
|
||||
SizeTyped() : Super() {}
|
||||
SizeTyped(Float aWidth, Float aHeight) : Super(aWidth, aHeight) {}
|
||||
MOZ_CONSTEXPR SizeTyped() : Super() {}
|
||||
MOZ_CONSTEXPR SizeTyped(Float aWidth, Float aHeight) : Super(aWidth, aHeight) {}
|
||||
explicit SizeTyped(const IntSizeTyped<units>& size) :
|
||||
Super(float(size.width), float(size.height)) {}
|
||||
|
||||
|
@ -207,8 +207,7 @@ CompositableClient::CreateTextureClientForDrawing(SurfaceFormat aFormat,
|
||||
if (parentBackend == LayersBackend::LAYERS_D3D9 &&
|
||||
!GetForwarder()->ForwardsToDifferentProcess() &&
|
||||
!(aTextureFlags & TEXTURE_ALLOC_FALLBACK)) {
|
||||
// non-DIB textures don't work with alpha, see notes in TextureD3D9.
|
||||
if (ContentForFormat(aFormat) != gfxContentType::COLOR) {
|
||||
if (!gfxWindowsPlatform::GetPlatform()->GetD3D9Device()) {
|
||||
result = new DIBTextureClientD3D9(aFormat, aTextureFlags);
|
||||
} else {
|
||||
result = new CairoTextureClientD3D9(aFormat, aTextureFlags);
|
||||
|
@ -63,7 +63,8 @@ ContentClient::CreateContentClient(CompositableForwarder* aForwarder)
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
useDoubleBuffering = LayerManagerComposite::SupportsDirectTexturing() ||
|
||||
useDoubleBuffering = (LayerManagerComposite::SupportsDirectTexturing() &&
|
||||
backend != LayersBackend::LAYERS_D3D9) ||
|
||||
backend == LayersBackend::LAYERS_BASIC;
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,8 @@ public:
|
||||
|
||||
virtual bool IsLocked() const MOZ_OVERRIDE { return mIsLocked; }
|
||||
|
||||
virtual bool ImplementsLocking() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE;
|
||||
|
||||
virtual gfx::IntSize GetSize() const MOZ_OVERRIDE { return mSize; }
|
||||
|
@ -1258,6 +1258,7 @@ CairoTextureClientD3D9::CairoTextureClientD3D9(gfx::SurfaceFormat aFormat, Textu
|
||||
, mFormat(aFormat)
|
||||
, mIsLocked(false)
|
||||
, mNeedsClear(false)
|
||||
, mLockRect(false)
|
||||
{
|
||||
MOZ_COUNT_CTOR(CairoTextureClientD3D9);
|
||||
}
|
||||
@ -1291,6 +1292,11 @@ CairoTextureClientD3D9::Unlock()
|
||||
mDrawTarget = nullptr;
|
||||
}
|
||||
|
||||
if (mLockRect) {
|
||||
mD3D9Surface->UnlockRect();
|
||||
mLockRect = false;
|
||||
}
|
||||
|
||||
if (mSurface) {
|
||||
mSurface = nullptr;
|
||||
}
|
||||
@ -1333,11 +1339,19 @@ CairoTextureClientD3D9::GetAsDrawTarget()
|
||||
}
|
||||
}
|
||||
|
||||
mSurface = new gfxWindowsSurface(mD3D9Surface);
|
||||
if (!mSurface || mSurface->CairoStatus()) {
|
||||
NS_WARNING("Could not create surface for d3d9 surface");
|
||||
mSurface = nullptr;
|
||||
return nullptr;
|
||||
if (ContentForFormat(mFormat) == gfxContentType::COLOR_ALPHA) {
|
||||
D3DLOCKED_RECT rect;
|
||||
mD3D9Surface->LockRect(&rect, nullptr, 0);
|
||||
mSurface = new gfxImageSurface((uint8_t*)rect.pBits, ThebesIntSize(mSize),
|
||||
rect.Pitch, gfxImageFormat::ARGB32);
|
||||
mLockRect = true;
|
||||
} else {
|
||||
mSurface = new gfxWindowsSurface(mD3D9Surface);
|
||||
if (!mSurface || mSurface->CairoStatus()) {
|
||||
NS_WARNING("Could not create surface for d3d9 surface");
|
||||
mSurface = nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
mDrawTarget =
|
||||
|
@ -181,7 +181,7 @@ protected:
|
||||
};
|
||||
|
||||
/**
|
||||
* Can only be drawn into through Cairo, and only support opaque surfaces.
|
||||
* Can only be drawn into through Cairo and need a D3D9 context on the client side.
|
||||
* The corresponding TextureHost is TextureHostD3D9.
|
||||
*/
|
||||
class CairoTextureClientD3D9 : public TextureClient
|
||||
@ -228,11 +228,12 @@ private:
|
||||
gfx::SurfaceFormat mFormat;
|
||||
bool mIsLocked;
|
||||
bool mNeedsClear;
|
||||
bool mLockRect;
|
||||
};
|
||||
|
||||
/**
|
||||
* Can only be drawn into through Cairo.
|
||||
* Supports opaque surfaces. Prefer CairoTextureClientD3D9 when possible.
|
||||
* Prefer CairoTextureClientD3D9 when possible.
|
||||
* The coresponding TextureHost is DIBTextureHostD3D9.
|
||||
*/
|
||||
class DIBTextureClientD3D9 : public TextureClient
|
||||
|
@ -23,204 +23,13 @@
|
||||
|
||||
#include "DBusThread.h"
|
||||
#include "RawDBusConnection.h"
|
||||
#include "DBusUtils.h"
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "base/eintr_wrapper.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "mozilla/SyncRunnable.h"
|
||||
#include "mozilla/NullPtr.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIThread.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#undef CHROMIUM_LOG
|
||||
#if defined(MOZ_WIDGET_GONK)
|
||||
#include <android/log.h>
|
||||
#define CHROMIUM_LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GonkDBus", args);
|
||||
#else
|
||||
#define BTDEBUG true
|
||||
#define CHROMIUM_LOG(args...) if (BTDEBUG) printf(args);
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
class DBusWatcher : public MessageLoopForIO::Watcher
|
||||
{
|
||||
public:
|
||||
DBusWatcher(RawDBusConnection* aConnection, DBusWatch* aWatch)
|
||||
: mConnection(aConnection),
|
||||
mWatch(aWatch)
|
||||
{
|
||||
MOZ_ASSERT(mConnection);
|
||||
MOZ_ASSERT(mWatch);
|
||||
}
|
||||
|
||||
~DBusWatcher()
|
||||
{ }
|
||||
|
||||
void StartWatching();
|
||||
void StopWatching();
|
||||
|
||||
static void FreeFunction(void* aData);
|
||||
static dbus_bool_t AddWatchFunction(DBusWatch* aWatch, void* aData);
|
||||
static void RemoveWatchFunction(DBusWatch* aWatch, void* aData);
|
||||
static void ToggleWatchFunction(DBusWatch* aWatch, void* aData);
|
||||
|
||||
RawDBusConnection* GetConnection();
|
||||
|
||||
private:
|
||||
void OnFileCanReadWithoutBlocking(int aFd);
|
||||
void OnFileCanWriteWithoutBlocking(int aFd);
|
||||
|
||||
// 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;
|
||||
|
||||
// DBus structures
|
||||
RawDBusConnection* mConnection;
|
||||
DBusWatch* mWatch;
|
||||
};
|
||||
|
||||
RawDBusConnection*
|
||||
DBusWatcher::GetConnection()
|
||||
{
|
||||
return mConnection;
|
||||
}
|
||||
|
||||
void DBusWatcher::StartWatching()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(mWatch);
|
||||
|
||||
int fd = dbus_watch_get_unix_fd(mWatch);
|
||||
|
||||
MessageLoopForIO* ioLoop = MessageLoopForIO::current();
|
||||
|
||||
unsigned int flags = dbus_watch_get_flags(mWatch);
|
||||
|
||||
if (flags & DBUS_WATCH_READABLE) {
|
||||
ioLoop->WatchFileDescriptor(fd, true, MessageLoopForIO::WATCH_READ,
|
||||
&mReadWatcher, this);
|
||||
}
|
||||
if (flags & DBUS_WATCH_WRITABLE) {
|
||||
ioLoop->WatchFileDescriptor(fd, true, MessageLoopForIO::WATCH_WRITE,
|
||||
&mWriteWatcher, this);
|
||||
}
|
||||
}
|
||||
|
||||
void DBusWatcher::StopWatching()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
unsigned int flags = dbus_watch_get_flags(mWatch);
|
||||
|
||||
if (flags & DBUS_WATCH_READABLE) {
|
||||
mReadWatcher.StopWatchingFileDescriptor();
|
||||
}
|
||||
if (flags & DBUS_WATCH_WRITABLE) {
|
||||
mWriteWatcher.StopWatchingFileDescriptor();
|
||||
}
|
||||
}
|
||||
|
||||
// DBus utility functions, used as function pointers in DBus setup
|
||||
|
||||
void
|
||||
DBusWatcher::FreeFunction(void* aData)
|
||||
{
|
||||
delete static_cast<DBusWatcher*>(aData);
|
||||
}
|
||||
|
||||
dbus_bool_t
|
||||
DBusWatcher::AddWatchFunction(DBusWatch* aWatch, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
RawDBusConnection* connection = static_cast<RawDBusConnection*>(aData);
|
||||
|
||||
DBusWatcher* dbusWatcher = new DBusWatcher(connection, aWatch);
|
||||
dbus_watch_set_data(aWatch, dbusWatcher, DBusWatcher::FreeFunction);
|
||||
|
||||
if (dbus_watch_get_enabled(aWatch)) {
|
||||
dbusWatcher->StartWatching();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::RemoveWatchFunction(DBusWatch* aWatch, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
DBusWatcher* dbusWatcher =
|
||||
static_cast<DBusWatcher*>(dbus_watch_get_data(aWatch));
|
||||
dbusWatcher->StopWatching();
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::ToggleWatchFunction(DBusWatch* aWatch, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
DBusWatcher* dbusWatcher =
|
||||
static_cast<DBusWatcher*>(dbus_watch_get_data(aWatch));
|
||||
|
||||
if (dbus_watch_get_enabled(aWatch)) {
|
||||
dbusWatcher->StartWatching();
|
||||
} else {
|
||||
dbusWatcher->StopWatching();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::OnFileCanReadWithoutBlocking(int aFd)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
dbus_watch_handle(mWatch, DBUS_WATCH_READABLE);
|
||||
|
||||
DBusDispatchStatus dbusDispatchStatus;
|
||||
do {
|
||||
dbusDispatchStatus =
|
||||
dbus_connection_dispatch(mConnection->GetConnection());
|
||||
} while (dbusDispatchStatus == DBUS_DISPATCH_DATA_REMAINS);
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::OnFileCanWriteWithoutBlocking(int aFd)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
dbus_watch_handle(mWatch, DBUS_WATCH_WRITABLE);
|
||||
}
|
||||
|
||||
class WatchDBusConnectionTask : public Task
|
||||
{
|
||||
public:
|
||||
@ -232,15 +41,7 @@ public:
|
||||
|
||||
void Run()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
dbus_bool_t success =
|
||||
dbus_connection_set_watch_functions(mConnection->GetConnection(),
|
||||
DBusWatcher::AddWatchFunction,
|
||||
DBusWatcher::RemoveWatchFunction,
|
||||
DBusWatcher::ToggleWatchFunction,
|
||||
mConnection, nullptr);
|
||||
NS_ENSURE_TRUE_VOID(success == TRUE);
|
||||
mConnection->Watch();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -23,13 +23,171 @@
|
||||
/* TODO: Remove BlueZ constant */
|
||||
#define BLUEZ_DBUS_BASE_IFC "org.bluez"
|
||||
|
||||
//
|
||||
// Runnables
|
||||
//
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
//
|
||||
// DBusWatcher
|
||||
//
|
||||
|
||||
class DBusWatcher : public MessageLoopForIO::Watcher
|
||||
{
|
||||
public:
|
||||
DBusWatcher(RawDBusConnection* aConnection, DBusWatch* aWatch)
|
||||
: mConnection(aConnection),
|
||||
mWatch(aWatch)
|
||||
{
|
||||
MOZ_ASSERT(mConnection);
|
||||
MOZ_ASSERT(mWatch);
|
||||
}
|
||||
|
||||
~DBusWatcher()
|
||||
{ }
|
||||
|
||||
void StartWatching();
|
||||
void StopWatching();
|
||||
|
||||
static void FreeFunction(void* aData);
|
||||
static dbus_bool_t AddWatchFunction(DBusWatch* aWatch, void* aData);
|
||||
static void RemoveWatchFunction(DBusWatch* aWatch, void* aData);
|
||||
static void ToggleWatchFunction(DBusWatch* aWatch, void* aData);
|
||||
|
||||
RawDBusConnection* GetConnection();
|
||||
|
||||
private:
|
||||
void OnFileCanReadWithoutBlocking(int aFd);
|
||||
void OnFileCanWriteWithoutBlocking(int aFd);
|
||||
|
||||
// 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;
|
||||
|
||||
// DBus structures
|
||||
RawDBusConnection* mConnection;
|
||||
DBusWatch* mWatch;
|
||||
};
|
||||
|
||||
RawDBusConnection*
|
||||
DBusWatcher::GetConnection()
|
||||
{
|
||||
return mConnection;
|
||||
}
|
||||
|
||||
void DBusWatcher::StartWatching()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(mWatch);
|
||||
|
||||
int fd = dbus_watch_get_unix_fd(mWatch);
|
||||
|
||||
MessageLoopForIO* ioLoop = MessageLoopForIO::current();
|
||||
|
||||
unsigned int flags = dbus_watch_get_flags(mWatch);
|
||||
|
||||
if (flags & DBUS_WATCH_READABLE) {
|
||||
ioLoop->WatchFileDescriptor(fd, true, MessageLoopForIO::WATCH_READ,
|
||||
&mReadWatcher, this);
|
||||
}
|
||||
if (flags & DBUS_WATCH_WRITABLE) {
|
||||
ioLoop->WatchFileDescriptor(fd, true, MessageLoopForIO::WATCH_WRITE,
|
||||
&mWriteWatcher, this);
|
||||
}
|
||||
}
|
||||
|
||||
void DBusWatcher::StopWatching()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
unsigned int flags = dbus_watch_get_flags(mWatch);
|
||||
|
||||
if (flags & DBUS_WATCH_READABLE) {
|
||||
mReadWatcher.StopWatchingFileDescriptor();
|
||||
}
|
||||
if (flags & DBUS_WATCH_WRITABLE) {
|
||||
mWriteWatcher.StopWatchingFileDescriptor();
|
||||
}
|
||||
}
|
||||
|
||||
// DBus utility functions, used as function pointers in DBus setup
|
||||
|
||||
void
|
||||
DBusWatcher::FreeFunction(void* aData)
|
||||
{
|
||||
delete static_cast<DBusWatcher*>(aData);
|
||||
}
|
||||
|
||||
dbus_bool_t
|
||||
DBusWatcher::AddWatchFunction(DBusWatch* aWatch, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
RawDBusConnection* connection = static_cast<RawDBusConnection*>(aData);
|
||||
|
||||
DBusWatcher* dbusWatcher = new DBusWatcher(connection, aWatch);
|
||||
dbus_watch_set_data(aWatch, dbusWatcher, DBusWatcher::FreeFunction);
|
||||
|
||||
if (dbus_watch_get_enabled(aWatch)) {
|
||||
dbusWatcher->StartWatching();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::RemoveWatchFunction(DBusWatch* aWatch, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
DBusWatcher* dbusWatcher =
|
||||
static_cast<DBusWatcher*>(dbus_watch_get_data(aWatch));
|
||||
dbusWatcher->StopWatching();
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::ToggleWatchFunction(DBusWatch* aWatch, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
DBusWatcher* dbusWatcher =
|
||||
static_cast<DBusWatcher*>(dbus_watch_get_data(aWatch));
|
||||
|
||||
if (dbus_watch_get_enabled(aWatch)) {
|
||||
dbusWatcher->StartWatching();
|
||||
} else {
|
||||
dbusWatcher->StopWatching();
|
||||
}
|
||||
}
|
||||
|
||||
// I/O-loop callbacks
|
||||
|
||||
void
|
||||
DBusWatcher::OnFileCanReadWithoutBlocking(int aFd)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
dbus_watch_handle(mWatch, DBUS_WATCH_READABLE);
|
||||
|
||||
DBusDispatchStatus dbusDispatchStatus;
|
||||
do {
|
||||
dbusDispatchStatus =
|
||||
dbus_connection_dispatch(mConnection->GetConnection());
|
||||
} while (dbusDispatchStatus == DBUS_DISPATCH_DATA_REMAINS);
|
||||
}
|
||||
|
||||
void
|
||||
DBusWatcher::OnFileCanWriteWithoutBlocking(int aFd)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
|
||||
dbus_watch_handle(mWatch, DBUS_WATCH_WRITABLE);
|
||||
}
|
||||
|
||||
//
|
||||
// Notification
|
||||
//
|
||||
|
||||
class Notification
|
||||
{
|
||||
public:
|
||||
@ -103,6 +261,22 @@ nsresult RawDBusConnection::EstablishDBusConnection()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool RawDBusConnection::Watch()
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(MessageLoop::current());
|
||||
|
||||
dbus_bool_t success =
|
||||
dbus_connection_set_watch_functions(mConnection,
|
||||
DBusWatcher::AddWatchFunction,
|
||||
DBusWatcher::RemoveWatchFunction,
|
||||
DBusWatcher::ToggleWatchFunction,
|
||||
this, nullptr);
|
||||
NS_ENSURE_TRUE(success == TRUE, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void RawDBusConnection::ScopedDBusConnectionPtrTraits::release(DBusConnection* ptr)
|
||||
{
|
||||
if (ptr) {
|
||||
|
@ -31,6 +31,8 @@ public:
|
||||
|
||||
nsresult EstablishDBusConnection();
|
||||
|
||||
bool Watch();
|
||||
|
||||
DBusConnection* GetConnection()
|
||||
{
|
||||
return mConnection;
|
||||
|
@ -21,7 +21,10 @@
|
||||
class JSAtom;
|
||||
class JSFreeOp;
|
||||
|
||||
namespace js { class StackFrame; }
|
||||
namespace js {
|
||||
class StackFrame;
|
||||
class ScriptFrameIter;
|
||||
}
|
||||
|
||||
// Raw JSScript* because this needs to be callable from a signal handler.
|
||||
extern JS_PUBLIC_API(unsigned)
|
||||
@ -40,6 +43,8 @@ class FrameDescription
|
||||
{
|
||||
}
|
||||
|
||||
explicit FrameDescription(const js::ScriptFrameIter& iter);
|
||||
|
||||
unsigned lineno() {
|
||||
if (!linenoComputed) {
|
||||
lineno_ = JS_PCToLineNumber(nullptr, script_, pc_);
|
||||
|
@ -82,6 +82,28 @@ StoreBuffer::WholeCellEdges::mark(JSTracer *trc)
|
||||
|
||||
/*** MonoTypeBuffer ***/
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
StoreBuffer::MonoTypeBuffer<T>::handleOverflow(StoreBuffer *owner)
|
||||
{
|
||||
if (!owner->isAboutToOverflow()) {
|
||||
/*
|
||||
* Compact the buffer now, and if that fails to free enough space then
|
||||
* trigger a minor collection.
|
||||
*/
|
||||
compact(owner);
|
||||
if (isAboutToOverflow())
|
||||
owner->setAboutToOverflow();
|
||||
} else {
|
||||
/*
|
||||
* A minor GC has already been triggered, so there's no point
|
||||
* compacting unless the buffer is totally full.
|
||||
*/
|
||||
if (storage_->availableInCurrentChunk() < sizeof(T))
|
||||
compact(owner);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
StoreBuffer::MonoTypeBuffer<T>::compactRemoveDuplicates(StoreBuffer *owner)
|
||||
|
@ -115,6 +115,8 @@ class StoreBuffer
|
||||
return !storage_->isEmpty() && storage_->availableInCurrentChunk() < MinAvailableSize;
|
||||
}
|
||||
|
||||
void handleOverflow(StoreBuffer *owner);
|
||||
|
||||
/* Compaction algorithms. */
|
||||
void compactRemoveDuplicates(StoreBuffer *owner);
|
||||
|
||||
@ -135,11 +137,8 @@ class StoreBuffer
|
||||
if (!tp)
|
||||
CrashAtUnhandlableOOM("Failed to allocate for MonoTypeBuffer::put.");
|
||||
|
||||
if (isAboutToOverflow()) {
|
||||
compact(owner);
|
||||
if (isAboutToOverflow())
|
||||
owner->setAboutToOverflow();
|
||||
}
|
||||
if (isAboutToOverflow())
|
||||
handleOverflow(owner);
|
||||
}
|
||||
|
||||
/* Mark the source of all edges in the store buffer. */
|
||||
|
@ -1010,16 +1010,13 @@ js_InvokeOperationCallback(JSContext *cx)
|
||||
*/
|
||||
rt->interrupt = 0;
|
||||
|
||||
/* IonMonkey sets its stack limit to UINTPTR_MAX to trigger operaton callbacks. */
|
||||
/*
|
||||
* IonMonkey sets its stack limit to UINTPTR_MAX to trigger operation
|
||||
* callbacks.
|
||||
*/
|
||||
rt->resetIonStackLimit();
|
||||
|
||||
if (rt->gcIsNeeded)
|
||||
GCSlice(rt, GC_NORMAL, rt->gcTriggerReason);
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
if (rt->gcStoreBuffer.isAboutToOverflow())
|
||||
MinorGC(cx, JS::gcreason::FULL_STORE_BUFFER);
|
||||
#endif
|
||||
js::gc::GCIfNeeded(cx);
|
||||
|
||||
#ifdef JS_ION
|
||||
/*
|
||||
|
@ -5051,6 +5051,24 @@ js::MinorGC(JSContext *cx, JS::gcreason::Reason reason)
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
js::gc::GCIfNeeded(JSContext *cx)
|
||||
{
|
||||
JSRuntime *rt = cx->runtime();
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
/*
|
||||
* In case of store buffer overflow perform minor GC first so that the
|
||||
* correct reason is seen in the logs.
|
||||
*/
|
||||
if (rt->gcStoreBuffer.isAboutToOverflow())
|
||||
MinorGC(cx, JS::gcreason::FULL_STORE_BUFFER);
|
||||
#endif
|
||||
|
||||
if (rt->gcIsNeeded)
|
||||
GCSlice(rt, GC_NORMAL, rt->gcTriggerReason);
|
||||
}
|
||||
|
||||
void
|
||||
js::gc::FinishBackgroundFinalize(JSRuntime *rt)
|
||||
{
|
||||
|
@ -1331,6 +1331,9 @@ NewCompartment(JSContext *cx, JS::Zone *zone, JSPrincipals *principals,
|
||||
|
||||
namespace gc {
|
||||
|
||||
extern void
|
||||
GCIfNeeded(JSContext *cx);
|
||||
|
||||
/* Tries to run a GC no matter what (used for GC zeal). */
|
||||
void
|
||||
RunDebugGC(JSContext *cx);
|
||||
|
@ -413,8 +413,8 @@ CheckAllocatorState(ThreadSafeContext *cx, AllocKind kind)
|
||||
return true;
|
||||
|
||||
JSContext *ncx = cx->asJSContext();
|
||||
#if defined(JS_GC_ZEAL) || defined(DEBUG)
|
||||
JSRuntime *rt = ncx->runtime();
|
||||
#if defined(JS_GC_ZEAL) || defined(DEBUG)
|
||||
JS_ASSERT_IF(rt->isAtomsCompartment(ncx->compartment()),
|
||||
kind == FINALIZE_STRING ||
|
||||
kind == FINALIZE_SHORT_STRING ||
|
||||
@ -426,13 +426,22 @@ CheckAllocatorState(ThreadSafeContext *cx, AllocKind kind)
|
||||
/* For testing out of memory conditions */
|
||||
JS_OOM_POSSIBLY_FAIL_REPORT(ncx);
|
||||
|
||||
if (allowGC) {
|
||||
#ifdef JS_GC_ZEAL
|
||||
if (allowGC && rt->needZealousGC())
|
||||
js::gc::RunDebugGC(ncx);
|
||||
if (rt->needZealousGC())
|
||||
js::gc::RunDebugGC(ncx);
|
||||
#endif
|
||||
|
||||
if (allowGC)
|
||||
if (rt->interrupt) {
|
||||
/*
|
||||
* Invoking the operation handler can fail and we can't usefully
|
||||
* handle that here. Just check in case we need to collect instead.
|
||||
*/
|
||||
js::gc::GCIfNeeded(ncx);
|
||||
}
|
||||
|
||||
MaybeCheckStackRoots(ncx);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -423,6 +423,13 @@ js::RunScript(JSContext *cx, RunState &state)
|
||||
return Interpret(cx, state);
|
||||
}
|
||||
|
||||
struct AutoGCIfNeeded
|
||||
{
|
||||
JSContext *cx_;
|
||||
AutoGCIfNeeded(JSContext *cx) : cx_(cx) {}
|
||||
~AutoGCIfNeeded() { js::gc::GCIfNeeded(cx_); }
|
||||
};
|
||||
|
||||
/*
|
||||
* Find a function reference and its 'this' value implicit first parameter
|
||||
* under argc arguments on cx's stack, and call the function. Push missing
|
||||
@ -438,6 +445,9 @@ js::Invoke(JSContext *cx, CallArgs args, MaybeConstruct construct)
|
||||
/* We should never enter a new script while cx->iterValue is live. */
|
||||
JS_ASSERT(cx->iterValue.isMagic(JS_NO_ITER_VALUE));
|
||||
|
||||
/* Perform GC if necessary on exit from the function. */
|
||||
AutoGCIfNeeded gcIfNeeded(cx);
|
||||
|
||||
/* MaybeConstruct is a subset of InitialFrameFlags */
|
||||
InitialFrameFlags initial = (InitialFrameFlags) construct;
|
||||
|
||||
|
@ -919,14 +919,21 @@ js_CallContextDebugHandler(JSContext *cx)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* A contructor that crates a FrameDescription from a ScriptFrameIter, to avoid
|
||||
* constructing a FrameDescription on the stack just to append it to a vector.
|
||||
* FrameDescription contains Heap<T> fields that should not live on the stack.
|
||||
*/
|
||||
JS::FrameDescription::FrameDescription(const ScriptFrameIter& iter)
|
||||
: script_(iter.script()), fun_(iter.maybeCallee()), pc_(iter.pc()), linenoComputed(false) {}
|
||||
|
||||
JS_PUBLIC_API(JS::StackDescription *)
|
||||
JS::DescribeStack(JSContext *cx, unsigned maxFrames)
|
||||
{
|
||||
Vector<FrameDescription> frames(cx);
|
||||
|
||||
for (NonBuiltinScriptFrameIter i(cx); !i.done(); ++i) {
|
||||
FrameDescription desc(i.script(), i.maybeCallee(), i.pc());
|
||||
if (!frames.append(desc))
|
||||
if (!frames.append(i))
|
||||
return nullptr;
|
||||
if (frames.length() == maxFrames)
|
||||
break;
|
||||
|
@ -694,13 +694,6 @@ nsMathMLContainerFrame::ReLayoutChildren(nsIFrame* aParentFrame)
|
||||
content->Tag() == nsGkAtoms::math)
|
||||
break;
|
||||
|
||||
// mark the frame dirty, and continue to climb up. It's important that
|
||||
// we're NOT doing this to the frame we plan to pass to FrameNeedsReflow()
|
||||
// XXXldb Why do we need to bother with this? Marking ancestor
|
||||
// dirty (which we do below) should do a superset of the work this
|
||||
// does.
|
||||
frame->AddStateBits(NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
|
||||
frame = parent;
|
||||
}
|
||||
|
||||
@ -737,13 +730,6 @@ nsMathMLContainerFrame::ChildListChanged(int32_t aModType)
|
||||
GetEmbellishDataFrom(parent, embellishData);
|
||||
if (embellishData.coreFrame != mEmbellishData.coreFrame)
|
||||
break;
|
||||
|
||||
// Important: do not do this to the frame we plan to pass to
|
||||
// ReLayoutChildren
|
||||
// XXXldb Why do we need to bother with this? Marking ancestor
|
||||
// dirty (which we do below) should do a superset of the work this
|
||||
// does.
|
||||
frame->AddStateBits(NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN);
|
||||
}
|
||||
}
|
||||
return ReLayoutChildren(frame);
|
||||
|
@ -1,9 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Updiagonalarrow</title></head>
|
||||
<body>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<p><math><menclose notation="updiagonalstrike"><mspace width="50px" height="50px"/></menclose></math></p>
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>Updiagonalarrow</title></head>
|
||||
<body>
|
||||
|
||||
<p><math><menclose><mspace width="50px" height="50px"/></menclose></math></p>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1a.html
Normal file
21
layout/reftests/mathml/menclose-1a.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="longdiv">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1b.html
Normal file
21
layout/reftests/mathml/menclose-1b.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="actuarial">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1c.html
Normal file
21
layout/reftests/mathml/menclose-1c.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="radical">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1d.html
Normal file
21
layout/reftests/mathml/menclose-1d.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="box">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1e.html
Normal file
21
layout/reftests/mathml/menclose-1e.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="roundedbox">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1f.html
Normal file
21
layout/reftests/mathml/menclose-1f.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="circle">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1g.html
Normal file
21
layout/reftests/mathml/menclose-1g.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="left">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1h.html
Normal file
21
layout/reftests/mathml/menclose-1h.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="right">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1i.html
Normal file
21
layout/reftests/mathml/menclose-1i.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="top">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1j.html
Normal file
21
layout/reftests/mathml/menclose-1j.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="bottom">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1k.html
Normal file
21
layout/reftests/mathml/menclose-1k.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="updiagonalstrike">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1l.html
Normal file
21
layout/reftests/mathml/menclose-1l.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="downdiagonalstrike">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1m.html
Normal file
21
layout/reftests/mathml/menclose-1m.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="verticalstrike">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1n.html
Normal file
21
layout/reftests/mathml/menclose-1n.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="horizontalstrike">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1o.html
Normal file
21
layout/reftests/mathml/menclose-1o.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="madruwb">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
21
layout/reftests/mathml/menclose-1p.html
Normal file
21
layout/reftests/mathml/menclose-1p.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
|
||||
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test menclose</title>
|
||||
<!-- Copyright (c) 2011 Design Science, Inc.
|
||||
License: Apache License 2.0 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- menclose: test that attributes have an effect -->
|
||||
<math>
|
||||
<menclose notation="updiagonalarrow">
|
||||
<mspace width="100px" height="50px"></mspace>
|
||||
</menclose>
|
||||
</math>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -153,7 +153,22 @@ fails == whitespace-trim-4.html whitespace-trim-4-ref.html # Bug 787215
|
||||
== multiscripts-1.html multiscripts-1-ref.html
|
||||
== mathml-mmultiscript-base.html mathml-mmultiscript-base-ref.html
|
||||
== mathml-mmultiscript-mprescript.html mathml-mmultiscript-mprescript-ref.html
|
||||
!= menclose-1.html menclose-1-ref.html
|
||||
!= menclose-1a.html menclose-1-ref.html
|
||||
!= menclose-1b.html menclose-1-ref.html
|
||||
!= menclose-1c.html menclose-1-ref.html
|
||||
!= menclose-1d.html menclose-1-ref.html
|
||||
!= menclose-1e.html menclose-1-ref.html
|
||||
!= menclose-1f.html menclose-1-ref.html
|
||||
!= menclose-1g.html menclose-1-ref.html
|
||||
!= menclose-1h.html menclose-1-ref.html
|
||||
!= menclose-1i.html menclose-1-ref.html
|
||||
!= menclose-1j.html menclose-1-ref.html
|
||||
!= menclose-1k.html menclose-1-ref.html
|
||||
!= menclose-1l.html menclose-1-ref.html
|
||||
!= menclose-1m.html menclose-1-ref.html
|
||||
!= menclose-1n.html menclose-1-ref.html
|
||||
!= menclose-1o.html menclose-1-ref.html
|
||||
!= menclose-1p.html menclose-1-ref.html
|
||||
== mmultiscript-align.html mmultiscript-align-ref.html
|
||||
== subscript-italic-correction.html subscript-italic-correction-ref.html
|
||||
== mathvariant-1a.html mathvariant-1a-ref.html
|
||||
|
@ -105,7 +105,7 @@ namespace mozilla {
|
||||
*
|
||||
* c2 = Move(c1);
|
||||
*
|
||||
* This destroys c1, moves c1's value to c2, and leaves c1 in an undefined but
|
||||
* This destroys c2, moves c1's value to c2, and leaves c1 in an undefined but
|
||||
* destructible state.
|
||||
*
|
||||
* As we say, a move must leave the original in a "destructible" state. The
|
||||
|
@ -136,7 +136,15 @@ public class testAddSearchEngine extends AboutHomeTest {
|
||||
boolean correctNumSearchEnginesDisplayed = waitForTest(new BooleanTest() {
|
||||
@Override
|
||||
public boolean test() {
|
||||
return (findListViewWithTag("browser_search").getAdapter().getCount() == expectedCount);
|
||||
ListView list = findListViewWithTag("browser_search");
|
||||
if (list == null) {
|
||||
return false;
|
||||
}
|
||||
ListAdapter adapter = list.getAdapter();
|
||||
if (adapter == null) {
|
||||
return false;
|
||||
}
|
||||
return (adapter.getCount() == expectedCount);
|
||||
}
|
||||
}, MAX_WAIT_TEST_MS);
|
||||
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <windows.h>
|
||||
#include <softpub.h>
|
||||
#include <wintrust.h>
|
||||
|
||||
#pragma comment(lib, "wintrust.lib")
|
||||
#endif // XP_WIN
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -47,8 +47,8 @@
|
||||
/* Following inclusions required for keepalive config not supported by NSPR. */
|
||||
#include "private/pprio.h"
|
||||
#if defined(XP_WIN)
|
||||
#include <Winsock2.h>
|
||||
#include <Mstcpip.h>
|
||||
#include <winsock2.h>
|
||||
#include <mstcpip.h>
|
||||
#elif defined(XP_UNIX)
|
||||
#include <errno.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/NullPtr.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
@ -25,6 +26,10 @@
|
||||
#endif
|
||||
#include "seccomp_filter.h"
|
||||
|
||||
#include "mozilla/dom/Exceptions.h"
|
||||
#include "nsString.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
#include "linux_seccomp.h"
|
||||
#ifdef MOZ_LOGGING
|
||||
#define FORCE_PR_LOG 1
|
||||
@ -57,6 +62,47 @@ struct sock_fprog seccomp_prog = {
|
||||
seccomp_filter,
|
||||
};
|
||||
|
||||
/**
|
||||
* Log JS stack info in the same place as the sandbox violation
|
||||
* message. Useful in case the responsible code is JS and all we have
|
||||
* are logs and a minidump with the C++ stacks (e.g., on TBPL).
|
||||
*/
|
||||
static void
|
||||
SandboxLogJSStack(void)
|
||||
{
|
||||
if (!NS_IsMainThread()) {
|
||||
// This might be a worker thread... or it might be a non-JS
|
||||
// thread, or a non-NSPR thread. There's isn't a good API for
|
||||
// dealing with this, yet.
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIStackFrame> frame = dom::GetCurrentJSStack();
|
||||
for (int i = 0; frame != nullptr; ++i) {
|
||||
nsAutoCString fileName, funName;
|
||||
int32_t lineNumber;
|
||||
|
||||
// Don't stop unwinding if an attribute can't be read.
|
||||
fileName.SetIsVoid(true);
|
||||
unused << frame->GetFilename(fileName);
|
||||
lineNumber = 0;
|
||||
unused << frame->GetLineNumber(&lineNumber);
|
||||
funName.SetIsVoid(true);
|
||||
unused << frame->GetName(funName);
|
||||
|
||||
if (!funName.IsVoid() || !fileName.IsVoid()) {
|
||||
LOG_ERROR("JS frame %d: %s %s line %d", i,
|
||||
funName.IsVoid() ? "(anonymous)" : funName.get(),
|
||||
fileName.IsVoid() ? "(no file)" : fileName.get(),
|
||||
lineNumber);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIStackFrame> nextFrame;
|
||||
nsresult rv = frame->GetCaller(getter_AddRefs(nextFrame));
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
frame = nextFrame;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the SIGSYS handler function. It is used to report to the user
|
||||
* which system call has been denied by Seccomp.
|
||||
@ -103,6 +149,9 @@ Reporter(int nr, siginfo_t *info, void *void_context)
|
||||
}
|
||||
#endif
|
||||
|
||||
// Do this last, in case it crashes or deadlocks.
|
||||
SandboxLogJSStack();
|
||||
|
||||
// Try to reraise, so the parent sees that this process crashed.
|
||||
// (If tgkill is forbidden, then seccomp will raise SIGSYS, which
|
||||
// also accomplishes that goal.)
|
||||
|
@ -584,39 +584,39 @@ class Marionette(object):
|
||||
time.sleep(1)
|
||||
return False
|
||||
|
||||
def _send_message(self, command, response_key, **kwargs):
|
||||
if not self.session and command not in ('newSession', 'getStatus'):
|
||||
raise MarionetteException(message="Please start a session")
|
||||
def _send_message(self, command, response_key="ok", **kwargs):
|
||||
if not self.session and command not in ("newSession", "getStatus"):
|
||||
raise MarionetteException("Please start a session")
|
||||
|
||||
message = { 'name': command }
|
||||
message = {"name": command}
|
||||
if self.session:
|
||||
message['sessionId'] = self.session
|
||||
message["sessionId"] = self.session
|
||||
if kwargs:
|
||||
message['parameters'] = kwargs
|
||||
message["parameters"] = kwargs
|
||||
|
||||
try:
|
||||
response = self.client.send(message)
|
||||
except socket.timeout:
|
||||
except socket.timeout as e:
|
||||
self.session = None
|
||||
self.window = None
|
||||
self.client.close()
|
||||
raise TimeoutException(message='socket.timeout', status=ErrorCodes.TIMEOUT, stacktrace=None)
|
||||
raise TimeoutException(
|
||||
"Connection timed out", status=ErrorCodes.TIMEOUT)
|
||||
|
||||
# Process any emulator commands that are sent from a script
|
||||
# while it's executing.
|
||||
while response.get("emulator_cmd"):
|
||||
response = self._handle_emulator_cmd(response)
|
||||
|
||||
if (response_key == 'ok' and response.get('ok') == True) or response_key in response:
|
||||
if response_key in response:
|
||||
return response[response_key]
|
||||
else:
|
||||
self._handle_error(response)
|
||||
self._handle_error(response)
|
||||
|
||||
def _handle_emulator_cmd(self, response):
|
||||
cmd = response.get("emulator_cmd")
|
||||
if not cmd or not self.emulator:
|
||||
raise MarionetteException(message="No emulator in this test to run "
|
||||
"command against.")
|
||||
raise MarionetteException(
|
||||
"No emulator in this test to run command against")
|
||||
cmd = cmd.encode("ascii")
|
||||
result = self.emulator._run_telnet(cmd)
|
||||
return self.client.send({"name": "emulatorCmdResult",
|
||||
@ -706,11 +706,17 @@ class Marionette(object):
|
||||
return self._send_message('getStatus', 'value')
|
||||
|
||||
def start_session(self, desired_capabilities=None):
|
||||
'''
|
||||
Creates a new Marionette session.
|
||||
"""Create a new Marionette session.
|
||||
|
||||
This method must be called before performing any other action.
|
||||
|
||||
:params desired_capabilities: An optional dict of desired
|
||||
capabilities. This is currently ignored.
|
||||
|
||||
:returns: A dict of the capabilities offered.
|
||||
|
||||
"""
|
||||
|
||||
You must call this method before performing any other action.
|
||||
'''
|
||||
try:
|
||||
# We are ignoring desired_capabilities, at least for now.
|
||||
self.session = self._send_message('newSession', 'value')
|
||||
|
@ -0,0 +1,32 @@
|
||||
# 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/.
|
||||
|
||||
import marionette_test
|
||||
|
||||
class TestSession(marionette_test.MarionetteTestCase):
|
||||
def setUp(self):
|
||||
super(TestSession, self).setUp()
|
||||
self.marionette.delete_session()
|
||||
|
||||
def test_new_session_returns_capabilities(self):
|
||||
# Sends newSession
|
||||
caps = self.marionette.start_session()
|
||||
|
||||
# Check that session was created. This implies the server
|
||||
# sent us the sessionId and status fields.
|
||||
self.assertIsNotNone(self.marionette.session)
|
||||
|
||||
# Required capabilities mandated by WebDriver spec
|
||||
self.assertIn("browserName", caps)
|
||||
self.assertIn("platformName", caps)
|
||||
self.assertIn("platformVersion", caps)
|
||||
|
||||
# Optional capabilities we want Marionette to support
|
||||
self.assertIn("cssSelectorsEnabled", caps)
|
||||
self.assertIn("device", caps)
|
||||
self.assertIn("handlesAlerts", caps)
|
||||
self.assertIn("javascriptEnabled", caps)
|
||||
self.assertIn("rotatable", caps)
|
||||
self.assertIn("takesScreenshot", caps)
|
||||
self.assertIn("version", caps)
|
@ -11,6 +11,8 @@ b2g = true
|
||||
; true if the test should be skipped
|
||||
skip = false
|
||||
|
||||
[test_session.py]
|
||||
|
||||
[test_expectedfail.py]
|
||||
expected = fail
|
||||
[test_getstatus.py]
|
||||
|
@ -489,11 +489,14 @@ MarionetteServerConnection.prototype = {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a new session. This creates a BrowserObj.
|
||||
* Create a new session. This creates a new BrowserObj.
|
||||
*
|
||||
* In a desktop environment, this opens a new 'about:blank' tab for
|
||||
* the client to test in.
|
||||
* In a desktop environment, this opens a new browser with
|
||||
* "about:blank" which subsequent commands will be sent to.
|
||||
*
|
||||
* This will send a hash map of supported capabilities to the client
|
||||
* as part of the Marionette:register IPC command in the
|
||||
* receiveMessage callback when a new browser is created.
|
||||
*/
|
||||
newSession: function MDA_newSession() {
|
||||
this.command_id = this.getCommandId();
|
||||
@ -507,25 +510,27 @@ MarionetteServerConnection.prototype = {
|
||||
if (!win ||
|
||||
(appName == "Firefox" && !win.gBrowser) ||
|
||||
(appName == "Fennec" && !win.BrowserApp)) {
|
||||
checkTimer.initWithCallback(waitForWindow.bind(this), 100, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
checkTimer.initWithCallback(waitForWindow.bind(this), 100,
|
||||
Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
else {
|
||||
this.startBrowser(win, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!Services.prefs.getBoolPref("marionette.contentListener")) {
|
||||
waitForWindow.call(this);
|
||||
}
|
||||
else if ((appName != "Firefox") && (this.curBrowser == null)) {
|
||||
//if there is a content listener, then we just wake it up
|
||||
// If there is a content listener, then we just wake it up
|
||||
this.addBrowser(this.getCurrentWindow());
|
||||
this.curBrowser.startSession(false, this.getCurrentWindow(), this.whenBrowserStarted);
|
||||
this.curBrowser.startSession(false, this.getCurrentWindow(),
|
||||
this.whenBrowserStarted);
|
||||
this.messageManager.broadcastAsyncMessage("Marionette:restart", {});
|
||||
}
|
||||
else {
|
||||
this.sendError("Session already running", 500, null, this.command_id);
|
||||
this.sendError("Session already running", 500, null,
|
||||
this.command_id);
|
||||
}
|
||||
this.switchToGlobalMessageManager();
|
||||
},
|
||||
@ -536,23 +541,29 @@ MarionetteServerConnection.prototype = {
|
||||
let rotatable = appName == "B2G" ? true : false;
|
||||
|
||||
let value = {
|
||||
'appBuildId' : Services.appinfo.appBuildID,
|
||||
'XULappId' : Services.appinfo.ID,
|
||||
'cssSelectorsEnabled': true,
|
||||
'browserName': appName,
|
||||
'handlesAlerts': false,
|
||||
'javascriptEnabled': true,
|
||||
'nativeEvents': false,
|
||||
'platformName': Services.appinfo.OS,
|
||||
'platformVersion': Services.appinfo.platformVersion,
|
||||
'secureSsl': false,
|
||||
'device': qemu == "1" ? "qemu" : (!device ? "desktop" : device),
|
||||
'rotatable': rotatable,
|
||||
'takesScreenshot': true,
|
||||
'takesElementScreenshot': true,
|
||||
'version': Services.appinfo.version
|
||||
'appBuildId' : Services.appinfo.appBuildID,
|
||||
'XULappId' : Services.appinfo.ID,
|
||||
'cssSelectorsEnabled': true,
|
||||
'browserName': appName,
|
||||
'handlesAlerts': false,
|
||||
'javascriptEnabled': true,
|
||||
'nativeEvents': false,
|
||||
'platform': Services.appinfo.OS,
|
||||
'platformName': Services.appinfo.OS,
|
||||
'platformVersion': Services.appinfo.platformVersion,
|
||||
'secureSsl': false,
|
||||
'device': qemu == "1" ? "qemu" : (!device ? "desktop" : device),
|
||||
'rotatable': rotatable,
|
||||
'takesScreenshot': true,
|
||||
'takesElementScreenshot': true,
|
||||
'version': Services.appinfo.version
|
||||
};
|
||||
|
||||
// eideticker (bug 965297) and mochitest (bug 965304)
|
||||
// compatibility
|
||||
if (appName == "B2G")
|
||||
value.b2g = true;
|
||||
|
||||
this.sendResponse(value, this.command_id);
|
||||
},
|
||||
|
||||
@ -2387,7 +2398,7 @@ MarionetteServerConnection.prototype = {
|
||||
return;
|
||||
}
|
||||
if (this.curBrowser.newSession) {
|
||||
this.sendResponse(reg.id, this.newSessionCommandId);
|
||||
this.getSessionCapabilities();
|
||||
this.newSessionCommandId = null;
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ void TelemetryIOInterposeObserver::Observe(Observation& aOb)
|
||||
for (uint32_t i = 0; i < safeDirsLen; ++i) {
|
||||
uint32_t curSafeDirLen = mSafeDirs[i].Length();
|
||||
if (curSafeDirLen <= filenameStrLen) {
|
||||
#if defined(XP_WIN)
|
||||
#if defined(_MSC_VER)
|
||||
if (!_wcsnicmp(filename, mSafeDirs[i].get(), curSafeDirLen)) {
|
||||
#else
|
||||
if (!std::char_traits<char16_t>::compare(filename, mSafeDirs[i].get(),
|
||||
|
@ -247,7 +247,7 @@ OS_LIBS += $(call EXPAND_LIBNAME,util)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet wbemuuid)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet wbemuuid wintrust)
|
||||
ifdef ACCESSIBILITY
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,oleacc)
|
||||
endif
|
||||
|
@ -549,7 +549,9 @@ SwitchToUpdatedApp(nsIFile *greDir, nsIFile *updateDir, nsIFile *statusFile,
|
||||
|
||||
int immersiveArgc = 0;
|
||||
#if defined(XP_WIN) && defined(MOZ_METRO)
|
||||
if (IsWindowsMetroUpdateRequest(appArgc, appArgv)) {
|
||||
// If this is desktop doing an update for metro, or if we're the metro browser
|
||||
// we want to launch the metro browser after we're finished.
|
||||
if (IsWindowsMetroUpdateRequest(appArgc, appArgv) || IsRunningInWindowsMetro()) {
|
||||
immersiveArgc = 1;
|
||||
}
|
||||
#endif
|
||||
@ -833,7 +835,9 @@ ApplyUpdate(nsIFile *greDir, nsIFile *updateDir, nsIFile *statusFile,
|
||||
|
||||
int immersiveArgc = 0;
|
||||
#if defined(XP_WIN) && defined(MOZ_METRO)
|
||||
if (IsWindowsMetroUpdateRequest(appArgc, appArgv)) {
|
||||
// If this is desktop doing an update for metro, or if we're the metro browser
|
||||
// we want to launch the metro browser after we're finished.
|
||||
if (IsWindowsMetroUpdateRequest(appArgc, appArgv) || IsRunningInWindowsMetro()) {
|
||||
immersiveArgc = 1;
|
||||
}
|
||||
#endif
|
||||
|
@ -42,8 +42,6 @@
|
||||
#include <sys/prctl.h> // set name
|
||||
#include <stdlib.h>
|
||||
#include <sched.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#ifdef ANDROID
|
||||
#include <android/log.h>
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user