Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merge m-c to autoland, a=merge
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: GOb2bgdUd36
  • Loading branch information
KWierso committed Jul 15, 2017
2 parents 18fd478 + 2c58195 commit 67737e6
Show file tree
Hide file tree
Showing 114 changed files with 1,509 additions and 1,105 deletions.
1 change: 1 addition & 0 deletions browser/components/sessionstore/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# browser_580512.js is disabled for leaking browser windows (bug 752467)

[DEFAULT]
skip-if = os == 'linux' && !e10s
support-files =
head.js
content.js
Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/macosx64/beta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/macosx64/devedition
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/macosx64/release
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# safeguard below

if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
4 changes: 1 addition & 3 deletions browser/config/mozconfigs/whitelist
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ for platform in all_platforms:
'mk_add_options MOZ_MAKE_FLAGS="-j4"',
'export BUILDING_RELEASE=1',
'if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then',
'MOZ_AUTOMATION_UPLOAD_SYMBOLS=1',
'MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}',
'MOZ_AUTOMATION_UPDATE_PACKAGING=1',
'fi',
]
Expand All @@ -87,14 +87,12 @@ whitelist['release']['linux32'] += [
'export MOZ_TELEMETRY_REPORTING=1',
'mk_add_options MOZ_PGO=1',
"mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
'MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}',
]
whitelist['release']['linux64'] += [
'export MOZILLA_OFFICIAL=1',
'export MOZ_TELEMETRY_REPORTING=1',
'mk_add_options MOZ_PGO=1',
"mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
'MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}',
]

if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/win32/beta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/win32/devedition
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/win32/release
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# safeguard below

if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/win64/beta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/win64/devedition
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
2 changes: 1 addition & 1 deletion browser/config/mozconfigs/win64/release
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# safeguard below

if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
MOZ_AUTOMATION_UPLOAD_SYMBOLS=1
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
MOZ_AUTOMATION_UPDATE_PACKAGING=1
fi

Expand Down
18 changes: 8 additions & 10 deletions devtools/client/jsonview/components/json-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,16 @@ define(function (require, exports, module) {
let content;
let data = this.props.data;

try {
if (isObject(data)) {
content = this.renderTree();
} else {
content = div({className: "jsonParseError"},
data + ""
);
}
} catch (err) {
if (!isObject(data)) {
content = div({className: "jsonPrimitiveValue"}, Rep({
object: data
}));
} else if (data instanceof Error) {
content = div({className: "jsonParseError"},
err + ""
data + ""
);
} else {
content = this.renderTree();
}

return (
Expand Down
4 changes: 4 additions & 0 deletions devtools/client/jsonview/css/json-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
/******************************************************************************/
/* JSON Panel */

.jsonPrimitiveValue,
.jsonParseError {
font-size: 12px;
font-family: Lucida Grande, Tahoma, sans-serif;
line-height: 15px;
padding: 10px;
}

.jsonParseError {
color: red;
}
6 changes: 5 additions & 1 deletion devtools/client/jsonview/json-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define(function (require, exports, module) {
try {
jsonData = JSON.parse(json.textContent);
} catch (err) {
jsonData = err + "";
jsonData = err;
}

// Application state object.
Expand Down Expand Up @@ -59,6 +59,10 @@ define(function (require, exports, module) {
},

onPrettify: function (data) {
if (jsonData instanceof Error) {
// Cannot prettify invalid JSON
return;
}
if (input.prettified) {
theApp.setState({jsonText: input.jsonText});
} else {
Expand Down
24 changes: 16 additions & 8 deletions dom/file/FileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,22 +373,30 @@ FileReader::ReadFileContent(Blob& aBlob,
mDataFormat = aDataFormat;
CopyUTF16toUTF8(aCharset, mCharset);

nsresult rv;
nsCOMPtr<nsIStreamTransportService> sts =
do_GetService(kStreamTransportServiceCID, &rv);
if (NS_WARN_IF(NS_FAILED(rv))) {
aRv.Throw(rv);
nsCOMPtr<nsIInputStream> stream;
mBlob->GetInternalStream(getter_AddRefs(stream), aRv);
if (NS_WARN_IF(aRv.Failed())) {
return;
}

nsCOMPtr<nsIInputStream> stream;
mBlob->GetInternalStream(getter_AddRefs(stream), aRv);
bool nonBlocking = false;
aRv = stream->IsNonBlocking(&nonBlocking);
if (NS_WARN_IF(aRv.Failed())) {
return;
}

mAsyncStream = do_QueryInterface(stream);
if (!mAsyncStream) {

// We want to have a non-blocking nsIAsyncInputStream.
if (!mAsyncStream || !nonBlocking) {
nsresult rv;
nsCOMPtr<nsIStreamTransportService> sts =
do_GetService(kStreamTransportServiceCID, &rv);
if (NS_WARN_IF(NS_FAILED(rv))) {
aRv.Throw(rv);
return;
}

nsCOMPtr<nsITransport> transport;
aRv = sts->CreateInputTransport(stream,
/* aStartOffset */ 0,
Expand Down
6 changes: 4 additions & 2 deletions dom/media/webaudio/AudioBufferSourceNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,10 @@ class AudioBufferSourceNodeEngine final : public AudioNodeEngine
int32_t mResamplerOutRate;
uint32_t mChannels;
float mDopplerShift;
AudioNodeStream* mDestination;
AudioNodeStream* mSource;
RefPtr<AudioNodeStream> mDestination;

// mSource deletes the engine in its destructor.
AudioNodeStream* MOZ_NON_OWNING_REF mSource;
AudioParamTimeline mPlaybackRateTimeline;
AudioParamTimeline mDetuneTimeline;
bool mLoop;
Expand Down
4 changes: 2 additions & 2 deletions dom/media/webaudio/AudioNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ class AudioNode : public DOMEventTargetHelper,
return amount;
}

// Weak reference.
AudioNode* mInputNode;
// The InputNode is destroyed when mInputNode is disconnected.
AudioNode* MOZ_NON_OWNING_REF mInputNode;
RefPtr<MediaInputPort> mStreamPort;
// The index of the input port this node feeds into.
// This is not used for connections to AudioParams.
Expand Down
3 changes: 2 additions & 1 deletion dom/media/webaudio/AudioNodeEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ class AudioNodeEngine
}

private:
dom::AudioNode* mNode; // main thread only
// This is cleared from AudioNode::DestroyMediaStream()
dom::AudioNode* MOZ_NON_OWNING_REF mNode; // main thread only
const char* const mNodeType;
const uint16_t mInputCount;
const uint16_t mOutputCount;
Expand Down
4 changes: 3 additions & 1 deletion dom/media/webaudio/AudioNodeStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ AudioNodeStream::SetStreamTimeParameter(uint32_t aIndex, AudioContext* aContext,
SetStreamTimeParameterImpl(mIndex, mRelativeToStream, mStreamTime);
}
double mStreamTime;
MediaStream* mRelativeToStream;
MediaStream* MOZ_UNSAFE_REF("ControlMessages are processed in order. This \
destination stream is not yet destroyed. Its (future) destroy message will be \
processed after this message.") mRelativeToStream;
uint32_t mIndex;
};

Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/BiquadFilterNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class BiquadFilterNodeEngine final : public AudioNodeEngine
}

private:
AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
BiquadFilterType mType;
AudioParamTimeline mFrequency;
AudioParamTimeline mDetune;
Expand Down
5 changes: 3 additions & 2 deletions dom/media/webaudio/ConstantSourceNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ class ConstantSourceNodeEngine final : public AudioNodeEngine
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

AudioNodeStream* mSource;
AudioNodeStream* mDestination;
// mSource deletes the engine in its destructor.
AudioNodeStream* MOZ_NON_OWNING_REF mSource;
RefPtr<AudioNodeStream> mDestination;
StreamTime mStart;
StreamTime mStop;
AudioParamTimeline mOffset;
Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/DelayNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class DelayNodeEngine final : public AudioNodeEngine
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
AudioParamTimeline mDelay;
DelayBuffer mBuffer;
double mMaxDelay;
Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/DynamicsCompressorNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class DynamicsCompressorNodeEngine final : public AudioNodeEngine
}

private:
AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
AudioParamTimeline mThreshold;
AudioParamTimeline mKnee;
AudioParamTimeline mRatio;
Expand Down
4 changes: 2 additions & 2 deletions dom/media/webaudio/GainNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class GainNodeEngine final : public AudioNodeEngine
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
{
// Not owned:
// - mDestination (probably)
// - mDestination - MediaStreamGraphImpl::CollectSizesForMemoryReport() accounts for mDestination.
// - mGain - Internal ref owned by AudioNode
return AudioNodeEngine::SizeOfExcludingThis(aMallocSizeOf);
}
Expand All @@ -111,7 +111,7 @@ class GainNodeEngine final : public AudioNodeEngine
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
AudioParamTimeline mGain;
};

Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/IIRFilterNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class IIRFilterNodeEngine final : public AudioNodeEngine
}

private:
AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
nsTArray<nsAutoPtr<blink::IIRFilter>> mIIRFilters;
AudioDoubleArray mFeedforward;
AudioDoubleArray mFeedback;
Expand Down
5 changes: 3 additions & 2 deletions dom/media/webaudio/OscillatorNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,9 @@ class OscillatorNodeEngine final : public AudioNodeEngine
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

AudioNodeStream* mSource;
AudioNodeStream* mDestination;
// mSource deletes this engine in its destructor
AudioNodeStream* MOZ_NON_OWNING_REF mSource;
RefPtr<AudioNodeStream> mDestination;
StreamTime mStart;
StreamTime mStop;
AudioParamTimeline mFrequency;
Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/PannerNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class PannerNodeEngine final : public AudioNodeEngine
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
// This member is set on the main thread, but is not accessed on the rendering
// thread untile mPanningModelFunction has changed, and this happens strictly
// later, via a MediaStreamGraph ControlMessage.
Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/ScriptProcessorNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class ScriptProcessorNodeEngine final : public AudioNodeEngine

friend class ScriptProcessorNode;

AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
nsAutoPtr<SharedBuffers> mSharedBuffers;
RefPtr<ThreadSharedFloatArrayBufferList> mInputBuffer;
const uint32_t mBufferSize;
Expand Down
2 changes: 1 addition & 1 deletion dom/media/webaudio/StereoPannerNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class StereoPannerNodeEngine final : public AudioNodeEngine
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}

AudioNodeStream* mDestination;
RefPtr<AudioNodeStream> mDestination;
AudioParamTimeline mPan;
};

Expand Down
3 changes: 2 additions & 1 deletion dom/media/webaudio/blink/HRTFDatabaseLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class HRTFDatabaseLoader::ProxyReleaseEvent final : public Runnable {
return NS_OK;
}
private:
HRTFDatabaseLoader* mLoader;
// Ownership transferred by ProxyRelease
HRTFDatabaseLoader* MOZ_OWNING_REF mLoader;
};

void HRTFDatabaseLoader::ProxyRelease()
Expand Down
3 changes: 2 additions & 1 deletion dom/media/webaudio/blink/HRTFDatabaseLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ class HRTFDatabaseLoader {
return mLoader ? mLoader->sizeOfIncludingThis(aMallocSizeOf) : 0;
}

HRTFDatabaseLoader* mLoader;
// The HRTFDatabaseLoader removes itself from s_loaderMap on destruction.
HRTFDatabaseLoader* MOZ_NON_OWNING_REF mLoader;
};

// Keeps track of loaders on a per-sample-rate basis.
Expand Down
6 changes: 4 additions & 2 deletions dom/webauthn/U2FHIDTokenManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ U2FHIDTokenManager::~U2FHIDTokenManager()
RefPtr<U2FRegisterPromise>
U2FHIDTokenManager::Register(const nsTArray<WebAuthnScopedCredentialDescriptor>& aDescriptors,
const nsTArray<uint8_t>& aApplication,
const nsTArray<uint8_t>& aChallenge)
const nsTArray<uint8_t>& aChallenge,
uint32_t aTimeoutMS)
{
return U2FRegisterPromise::CreateAndReject(NS_ERROR_NOT_IMPLEMENTED, __func__);
}
Expand All @@ -63,7 +64,8 @@ U2FHIDTokenManager::Register(const nsTArray<WebAuthnScopedCredentialDescriptor>&
RefPtr<U2FSignPromise>
U2FHIDTokenManager::Sign(const nsTArray<WebAuthnScopedCredentialDescriptor>& aDescriptors,
const nsTArray<uint8_t>& aApplication,
const nsTArray<uint8_t>& aChallenge)
const nsTArray<uint8_t>& aChallenge,
uint32_t aTimeoutMS)
{
return U2FSignPromise::CreateAndReject(NS_ERROR_NOT_IMPLEMENTED, __func__);
}
Expand Down
Loading

0 comments on commit 67737e6

Please sign in to comment.