mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Merge inbound to m-c
This commit is contained in:
commit
3a998cce2a
@ -2547,7 +2547,7 @@ AC_LANG_C
|
|||||||
dnl Check for .hidden assembler directive and visibility attribute.
|
dnl Check for .hidden assembler directive and visibility attribute.
|
||||||
dnl Borrowed from glibc configure.in
|
dnl Borrowed from glibc configure.in
|
||||||
dnl ===============================================================
|
dnl ===============================================================
|
||||||
if test "$GNU_CC"; then
|
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
|
||||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
||||||
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
||||||
if test -n "$gonkdir"; then
|
if test -n "$gonkdir"; then
|
||||||
@ -5806,6 +5806,11 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
|
|||||||
MOZ_D3DCOMPILER_VISTA_DLL=
|
MOZ_D3DCOMPILER_VISTA_DLL=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# On mingw, check if headers are provided by toolchain.
|
||||||
|
if test -n "$GNU_CC"; then
|
||||||
|
MOZ_CHECK_HEADER(d3d10.h, MOZ_HAS_WINSDK_WITH_D3D=1)
|
||||||
|
fi
|
||||||
|
|
||||||
######################################
|
######################################
|
||||||
# Find _43 for use by XP.
|
# Find _43 for use by XP.
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "mozilla/DOMEventTargetHelper.h"
|
#include "mozilla/DOMEventTargetHelper.h"
|
||||||
#include "mozilla/dom/EventSourceBinding.h"
|
#include "mozilla/dom/EventSourceBinding.h"
|
||||||
#include "mozilla/dom/MessageEvent.h"
|
#include "mozilla/dom/MessageEvent.h"
|
||||||
|
#include "mozilla/dom/ScriptSettings.h"
|
||||||
|
|
||||||
#include "js/OldDebugAPI.h"
|
#include "js/OldDebugAPI.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
@ -29,7 +30,6 @@
|
|||||||
#include "nsIChannelPolicy.h"
|
#include "nsIChannelPolicy.h"
|
||||||
#include "nsIContentSecurityPolicy.h"
|
#include "nsIContentSecurityPolicy.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsCxPusher.h"
|
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
#include "xpcpublic.h"
|
#include "xpcpublic.h"
|
||||||
#include "nsCrossSiteListenerProxy.h"
|
#include "nsCrossSiteListenerProxy.h"
|
||||||
@ -1236,15 +1236,15 @@ EventSource::DispatchAllMessageEvents()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's play get the JSContext
|
// We need a parent object so that we can enter its compartment.
|
||||||
nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(GetOwner());
|
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryInterface(GetParentObject());
|
||||||
NS_ENSURE_TRUE_VOID(sgo);
|
if (NS_WARN_IF(!parentObject)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nsIScriptContext* scriptContext = sgo->GetContext();
|
AutoJSAPI jsapi;
|
||||||
NS_ENSURE_TRUE_VOID(scriptContext);
|
JSContext* cx = jsapi.cx();
|
||||||
|
JSAutoCompartment ac(cx, parentObject->GetGlobalJSObject());
|
||||||
AutoPushJSContext cx(scriptContext->GetNativeContext());
|
|
||||||
NS_ENSURE_TRUE_VOID(cx);
|
|
||||||
|
|
||||||
while (mMessagesToDispatch.GetSize() > 0) {
|
while (mMessagesToDispatch.GetSize() > 0) {
|
||||||
nsAutoPtr<Message>
|
nsAutoPtr<Message>
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "nsIDOMApplicationRegistry.h"
|
#include "nsIDOMApplicationRegistry.h"
|
||||||
#include "nsIBaseWindow.h"
|
#include "nsIBaseWindow.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsCxPusher.h"
|
|
||||||
#include "nsIXPConnect.h"
|
#include "nsIXPConnect.h"
|
||||||
#include "nsUnicharUtils.h"
|
#include "nsUnicharUtils.h"
|
||||||
#include "nsIScriptGlobalObject.h"
|
#include "nsIScriptGlobalObject.h"
|
||||||
@ -2423,12 +2422,6 @@ nsFrameLoader::EnsureMessageManager()
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIScriptContext* sctx = mOwnerContent->GetContextForEventHandlers(&rv);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
NS_ENSURE_STATE(sctx);
|
|
||||||
AutoPushJSContext cx(sctx->GetNativeContext());
|
|
||||||
NS_ENSURE_STATE(cx);
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMChromeWindow> chromeWindow =
|
nsCOMPtr<nsIDOMChromeWindow> chromeWindow =
|
||||||
do_QueryInterface(GetOwnerDoc()->GetWindow());
|
do_QueryInterface(GetOwnerDoc()->GetWindow());
|
||||||
nsCOMPtr<nsIMessageBroadcaster> parentManager;
|
nsCOMPtr<nsIMessageBroadcaster> parentManager;
|
||||||
|
@ -4286,16 +4286,18 @@ CanvasRenderingContext2D::ShouldForceInactiveLayer(LayerManager *aManager)
|
|||||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef)
|
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release)
|
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release)
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(CanvasPath)
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPath, mParent)
|
||||||
|
|
||||||
CanvasPath::CanvasPath(nsCOMPtr<nsISupports> aParent) : mParent(aParent)
|
CanvasPath::CanvasPath(nsISupports* aParent)
|
||||||
|
: mParent(aParent)
|
||||||
{
|
{
|
||||||
SetIsDOMBinding();
|
SetIsDOMBinding();
|
||||||
|
|
||||||
mPathBuilder = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget()->CreatePathBuilder();
|
mPathBuilder = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget()->CreatePathBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
CanvasPath::CanvasPath(nsCOMPtr<nsISupports> aParent, RefPtr<PathBuilder> aPathBuilder): mParent(aParent), mPathBuilder(aPathBuilder)
|
CanvasPath::CanvasPath(nsISupports* aParent, RefPtr<PathBuilder> aPathBuilder)
|
||||||
|
: mParent(aParent), mPathBuilder(aPathBuilder)
|
||||||
{
|
{
|
||||||
SetIsDOMBinding();
|
SetIsDOMBinding();
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ extern const mozilla::gfx::Float SIGMA_MAX;
|
|||||||
|
|
||||||
template<typename T> class Optional;
|
template<typename T> class Optional;
|
||||||
|
|
||||||
class CanvasPath :
|
class CanvasPath MOZ_FINAL :
|
||||||
public nsWrapperCache
|
public nsWrapperCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -88,8 +88,8 @@ public:
|
|||||||
mozilla::RefPtr<mozilla::gfx::Path> GetPath(const CanvasWindingRule& winding,
|
mozilla::RefPtr<mozilla::gfx::Path> GetPath(const CanvasWindingRule& winding,
|
||||||
const mozilla::RefPtr<mozilla::gfx::DrawTarget>& mTarget) const;
|
const mozilla::RefPtr<mozilla::gfx::DrawTarget>& mTarget) const;
|
||||||
|
|
||||||
CanvasPath(nsCOMPtr<nsISupports> aParent);
|
explicit CanvasPath(nsISupports* aParent);
|
||||||
CanvasPath(nsCOMPtr<nsISupports> aParent, RefPtr<gfx::PathBuilder> mPathBuilder);
|
CanvasPath(nsISupports* aParent, RefPtr<gfx::PathBuilder> mPathBuilder);
|
||||||
virtual ~CanvasPath() {}
|
virtual ~CanvasPath() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -383,4 +383,8 @@ function runTests() {
|
|||||||
|
|
||||||
addLoadEvent(runTests);
|
addLoadEvent(runTests);
|
||||||
|
|
||||||
|
// Don't leak the world via the Path2D reference to its window.
|
||||||
|
document.all;
|
||||||
|
window.p = new Path2D();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -426,7 +426,7 @@ protected:
|
|||||||
|
|
||||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
static_cast<HTMLFormElement*>(mEventNode.get())->EventHandled();
|
static_cast<HTMLFormElement*>(mTarget.get())->EventHandled();
|
||||||
return AsyncEventDispatcher::Run();
|
return AsyncEventDispatcher::Run();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -166,8 +166,7 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioBuffer::SetRawChannelContents(JSContext* aJSContext, uint32_t aChannel,
|
AudioBuffer::SetRawChannelContents(uint32_t aChannel, float* aContents)
|
||||||
float* aContents)
|
|
||||||
{
|
{
|
||||||
PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannel]), aContents, mLength);
|
PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannel]), aContents, mLength);
|
||||||
}
|
}
|
||||||
|
@ -97,9 +97,7 @@ public:
|
|||||||
// This function needs to be called on an AudioBuffer which has not been
|
// This function needs to be called on an AudioBuffer which has not been
|
||||||
// handed off to the content yet, and right after the object has been
|
// handed off to the content yet, and right after the object has been
|
||||||
// initialized.
|
// initialized.
|
||||||
void SetRawChannelContents(JSContext* aJSContext,
|
void SetRawChannelContents(uint32_t aChannel, float* aContents);
|
||||||
uint32_t aChannel,
|
|
||||||
float* aContents);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool RestoreJSChannelData(JSContext* aJSContext);
|
bool RestoreJSChannelData(JSContext* aJSContext);
|
||||||
|
@ -590,21 +590,16 @@ AudioContext::UpdateNodeCount(int32_t aDelta)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JSContext*
|
JSObject*
|
||||||
AudioContext::GetJSContext() const
|
AudioContext::GetGlobalJSObject() const
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryInterface(GetParentObject());
|
||||||
|
if (!parentObject) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIScriptGlobalObject> scriptGlobal =
|
// This can also return null.
|
||||||
do_QueryInterface(GetParentObject());
|
return parentObject->GetGlobalJSObject();
|
||||||
if (!scriptGlobal) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
nsIScriptContext* scriptContext = scriptGlobal->GetContext();
|
|
||||||
if (!scriptContext) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
return scriptContext->GetNativeContext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -219,7 +219,7 @@ public:
|
|||||||
void Mute() const;
|
void Mute() const;
|
||||||
void Unmute() const;
|
void Unmute() const;
|
||||||
|
|
||||||
JSContext* GetJSContext() const;
|
JSObject* GetGlobalJSObject() const;
|
||||||
|
|
||||||
AudioChannel MozAudioChannelType() const;
|
AudioChannel MozAudioChannelType() const;
|
||||||
void SetMozAudioChannelType(AudioChannel aValue, ErrorResult& aRv);
|
void SetMozAudioChannelType(AudioChannel aValue, ErrorResult& aRv);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "AudioDestinationNode.h"
|
#include "AudioDestinationNode.h"
|
||||||
#include "mozilla/dom/AudioDestinationNodeBinding.h"
|
#include "mozilla/dom/AudioDestinationNodeBinding.h"
|
||||||
|
#include "mozilla/dom/ScriptSettings.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
#include "mozilla/Services.h"
|
#include "mozilla/Services.h"
|
||||||
#include "AudioChannelAgent.h"
|
#include "AudioChannelAgent.h"
|
||||||
@ -125,11 +126,15 @@ public:
|
|||||||
// which is strongly referenced by the runnable that called
|
// which is strongly referenced by the runnable that called
|
||||||
// AudioDestinationNode::FireOfflineCompletionEvent.
|
// AudioDestinationNode::FireOfflineCompletionEvent.
|
||||||
|
|
||||||
AutoPushJSContext cx(context->GetJSContext());
|
// We need the global for the context so that we can enter its compartment.
|
||||||
if (!cx) {
|
JSObject* global = context->GetGlobalJSObject();
|
||||||
|
if (NS_WARN_IF(!global)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
JSAutoRequest ar(cx);
|
|
||||||
|
AutoJSAPI jsapi;
|
||||||
|
JSContext* cx = jsapi.cx();
|
||||||
|
JSAutoCompartment ac(cx, global);
|
||||||
|
|
||||||
// Create the input buffer
|
// Create the input buffer
|
||||||
nsRefPtr<AudioBuffer> renderedBuffer = new AudioBuffer(context,
|
nsRefPtr<AudioBuffer> renderedBuffer = new AudioBuffer(context,
|
||||||
@ -139,7 +144,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
||||||
renderedBuffer->SetRawChannelContents(cx, i, mInputChannels[i]);
|
renderedBuffer->SetRawChannelContents(i, mInputChannels[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRefPtr<OfflineAudioCompletionEvent> event =
|
nsRefPtr<OfflineAudioCompletionEvent> event =
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "AudioProcessingEvent.h"
|
#include "AudioProcessingEvent.h"
|
||||||
#include "mozilla/dom/AudioProcessingEventBinding.h"
|
#include "mozilla/dom/AudioProcessingEventBinding.h"
|
||||||
|
#include "mozilla/dom/ScriptSettings.h"
|
||||||
#include "AudioContext.h"
|
#include "AudioContext.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
@ -40,7 +41,15 @@ void
|
|||||||
AudioProcessingEvent::LazilyCreateBuffer(nsRefPtr<AudioBuffer>& aBuffer,
|
AudioProcessingEvent::LazilyCreateBuffer(nsRefPtr<AudioBuffer>& aBuffer,
|
||||||
uint32_t aNumberOfChannels)
|
uint32_t aNumberOfChannels)
|
||||||
{
|
{
|
||||||
AutoPushJSContext cx(mNode->Context()->GetJSContext());
|
// We need the global for the context so that we can enter its compartment.
|
||||||
|
JSObject* global = mNode->Context()->GetGlobalJSObject();
|
||||||
|
if (NS_WARN_IF(!global)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AutoJSAPI jsapi;
|
||||||
|
JSContext* cx = jsapi.cx();
|
||||||
|
JSAutoCompartment ac(cx, global);
|
||||||
|
|
||||||
aBuffer = new AudioBuffer(mNode->Context(), mNode->BufferSize(),
|
aBuffer = new AudioBuffer(mNode->Context(), mNode->BufferSize(),
|
||||||
mNode->Context()->SampleRate());
|
mNode->Context()->SampleRate());
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "MediaBufferDecoder.h"
|
#include "MediaBufferDecoder.h"
|
||||||
#include "BufferDecoder.h"
|
#include "BufferDecoder.h"
|
||||||
#include "mozilla/dom/AudioContextBinding.h"
|
#include "mozilla/dom/AudioContextBinding.h"
|
||||||
|
#include "mozilla/dom/ScriptSettings.h"
|
||||||
#include <speex/speex_resampler.h>
|
#include <speex/speex_resampler.h>
|
||||||
#include "nsXPCOMCIDInternal.h"
|
#include "nsXPCOMCIDInternal.h"
|
||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
@ -18,7 +19,6 @@
|
|||||||
#include "nsIScriptObjectPrincipal.h"
|
#include "nsIScriptObjectPrincipal.h"
|
||||||
#include "nsIScriptError.h"
|
#include "nsIScriptError.h"
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
#include "nsCxPusher.h"
|
|
||||||
#include "WebAudioUtils.h"
|
#include "WebAudioUtils.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
@ -402,12 +402,16 @@ WebAudioDecodeJob::AllocateBuffer()
|
|||||||
MOZ_ASSERT(!mOutput);
|
MOZ_ASSERT(!mOutput);
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
// First, get a JSContext
|
// We need the global for the context so that we can enter its compartment.
|
||||||
AutoPushJSContext cx(mContext->GetJSContext());
|
JSObject* global = mContext->GetGlobalJSObject();
|
||||||
if (!cx) {
|
if (NS_WARN_IF(!global)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutoJSAPI jsapi;
|
||||||
|
JSContext* cx = jsapi.cx();
|
||||||
|
JSAutoCompartment ac(cx, global);
|
||||||
|
|
||||||
// Now create the AudioBuffer
|
// Now create the AudioBuffer
|
||||||
mOutput = new AudioBuffer(mContext, mWriteIndex, mContext->SampleRate());
|
mOutput = new AudioBuffer(mContext, mWriteIndex, mContext->SampleRate());
|
||||||
if (!mOutput->InitializeBuffers(mChannelBuffers.Length(), cx)) {
|
if (!mOutput->InitializeBuffers(mChannelBuffers.Length(), cx)) {
|
||||||
@ -415,7 +419,7 @@ WebAudioDecodeJob::AllocateBuffer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (uint32_t i = 0; i < mChannelBuffers.Length(); ++i) {
|
for (uint32_t i = 0; i < mChannelBuffers.Length(); ++i) {
|
||||||
mOutput->SetRawChannelContents(cx, i, mChannelBuffers[i]);
|
mOutput->SetRawChannelContents(i, mChannelBuffers[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "AudioNodeStream.h"
|
#include "AudioNodeStream.h"
|
||||||
#include "AudioProcessingEvent.h"
|
#include "AudioProcessingEvent.h"
|
||||||
#include "WebAudioUtils.h"
|
#include "WebAudioUtils.h"
|
||||||
#include "nsCxPusher.h"
|
#include "mozilla/dom/ScriptSettings.h"
|
||||||
#include "mozilla/Mutex.h"
|
#include "mozilla/Mutex.h"
|
||||||
#include "mozilla/PodOperations.h"
|
#include "mozilla/PodOperations.h"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
@ -402,44 +402,51 @@ private:
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoPushJSContext cx(node->Context()->GetJSContext());
|
// Get the global for the context so that we can enter its compartment.
|
||||||
if (cx) {
|
JSObject* global = node->Context()->GetGlobalJSObject();
|
||||||
|
if (NS_WARN_IF(!global)) {
|
||||||
// Create the input buffer
|
return NS_OK;
|
||||||
nsRefPtr<AudioBuffer> inputBuffer;
|
|
||||||
if (!mNullInput) {
|
|
||||||
inputBuffer = new AudioBuffer(node->Context(),
|
|
||||||
node->BufferSize(),
|
|
||||||
node->Context()->SampleRate());
|
|
||||||
if (!inputBuffer->InitializeBuffers(mInputChannels.Length(), cx)) {
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
// Put the channel data inside it
|
|
||||||
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
|
||||||
inputBuffer->SetRawChannelContents(cx, i, mInputChannels[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ask content to produce data in the output buffer
|
|
||||||
// Note that we always avoid creating the output buffer here, and we try to
|
|
||||||
// avoid creating the input buffer as well. The AudioProcessingEvent class
|
|
||||||
// knows how to lazily create them if needed once the script tries to access
|
|
||||||
// them. Otherwise, we may be able to get away without creating them!
|
|
||||||
nsRefPtr<AudioProcessingEvent> event = new AudioProcessingEvent(node, nullptr, nullptr);
|
|
||||||
event->InitEvent(inputBuffer,
|
|
||||||
mInputChannels.Length(),
|
|
||||||
mPlaybackTime);
|
|
||||||
node->DispatchTrustedEvent(event);
|
|
||||||
|
|
||||||
// Steal the output buffers
|
|
||||||
nsRefPtr<ThreadSharedFloatArrayBufferList> output;
|
|
||||||
if (event->HasOutputBuffer()) {
|
|
||||||
output = event->OutputBuffer()->GetThreadSharedChannelsForRate(cx);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Append it to our output buffer queue
|
|
||||||
node->GetSharedBuffers()->FinishProducingOutputBuffer(output, node->BufferSize());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AutoJSAPI jsapi;
|
||||||
|
JSContext* cx = jsapi.cx();
|
||||||
|
JSAutoCompartment ac(cx, global);
|
||||||
|
|
||||||
|
// Create the input buffer
|
||||||
|
nsRefPtr<AudioBuffer> inputBuffer;
|
||||||
|
if (!mNullInput) {
|
||||||
|
inputBuffer = new AudioBuffer(node->Context(),
|
||||||
|
node->BufferSize(),
|
||||||
|
node->Context()->SampleRate());
|
||||||
|
if (!inputBuffer->InitializeBuffers(mInputChannels.Length(), cx)) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
// Put the channel data inside it
|
||||||
|
for (uint32_t i = 0; i < mInputChannels.Length(); ++i) {
|
||||||
|
inputBuffer->SetRawChannelContents(i, mInputChannels[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ask content to produce data in the output buffer
|
||||||
|
// Note that we always avoid creating the output buffer here, and we try to
|
||||||
|
// avoid creating the input buffer as well. The AudioProcessingEvent class
|
||||||
|
// knows how to lazily create them if needed once the script tries to access
|
||||||
|
// them. Otherwise, we may be able to get away without creating them!
|
||||||
|
nsRefPtr<AudioProcessingEvent> event = new AudioProcessingEvent(node, nullptr, nullptr);
|
||||||
|
event->InitEvent(inputBuffer,
|
||||||
|
mInputChannels.Length(),
|
||||||
|
mPlaybackTime);
|
||||||
|
node->DispatchTrustedEvent(event);
|
||||||
|
|
||||||
|
// Steal the output buffers
|
||||||
|
nsRefPtr<ThreadSharedFloatArrayBufferList> output;
|
||||||
|
if (event->HasOutputBuffer()) {
|
||||||
|
output = event->OutputBuffer()->GetThreadSharedChannelsForRate(cx);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append it to our output buffer queue
|
||||||
|
node->GetSharedBuffers()->FinishProducingOutputBuffer(output, node->BufferSize());
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
@ -13452,12 +13452,6 @@ nsGlobalWindow::GetMessageManager(ErrorResult& aError)
|
|||||||
MOZ_ASSERT(IsChromeWindow());
|
MOZ_ASSERT(IsChromeWindow());
|
||||||
nsGlobalChromeWindow* myself = static_cast<nsGlobalChromeWindow*>(this);
|
nsGlobalChromeWindow* myself = static_cast<nsGlobalChromeWindow*>(this);
|
||||||
if (!myself->mMessageManager) {
|
if (!myself->mMessageManager) {
|
||||||
nsIScriptContext* scx = GetContextInternal();
|
|
||||||
if (NS_WARN_IF(!scx || !(scx->GetNativeContext()))) {
|
|
||||||
aError.Throw(NS_ERROR_UNEXPECTED);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIMessageBroadcaster> globalMM =
|
nsCOMPtr<nsIMessageBroadcaster> globalMM =
|
||||||
do_GetService("@mozilla.org/globalmessagemanager;1");
|
do_GetService("@mozilla.org/globalmessagemanager;1");
|
||||||
myself->mMessageManager =
|
myself->mMessageManager =
|
||||||
|
@ -19,13 +19,13 @@ using namespace dom;
|
|||||||
* mozilla::AsyncEventDispatcher
|
* mozilla::AsyncEventDispatcher
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
AsyncEventDispatcher::AsyncEventDispatcher(nsINode* aEventNode,
|
AsyncEventDispatcher::AsyncEventDispatcher(EventTarget* aTarget,
|
||||||
WidgetEvent& aEvent)
|
WidgetEvent& aEvent)
|
||||||
: mEventNode(aEventNode)
|
: mTarget(aTarget)
|
||||||
, mDispatchChromeOnly(false)
|
, mDispatchChromeOnly(false)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mEventNode);
|
MOZ_ASSERT(mTarget);
|
||||||
EventDispatcher::CreateEvent(aEventNode, nullptr, &aEvent, EmptyString(),
|
EventDispatcher::CreateEvent(aTarget, nullptr, &aEvent, EmptyString(),
|
||||||
getter_AddRefs(mEvent));
|
getter_AddRefs(mEvent));
|
||||||
NS_ASSERTION(mEvent, "Should never fail to create an event");
|
NS_ASSERTION(mEvent, "Should never fail to create an event");
|
||||||
mEvent->DuplicatePrivateData();
|
mEvent->DuplicatePrivateData();
|
||||||
@ -39,8 +39,9 @@ AsyncEventDispatcher::Run()
|
|||||||
if (mDispatchChromeOnly) {
|
if (mDispatchChromeOnly) {
|
||||||
MOZ_ASSERT(mEvent->InternalDOMEvent()->IsTrusted());
|
MOZ_ASSERT(mEvent->InternalDOMEvent()->IsTrusted());
|
||||||
|
|
||||||
nsCOMPtr<nsIDocument> ownerDoc = mEventNode->OwnerDoc();
|
nsCOMPtr<nsINode> node = do_QueryInterface(mTarget);
|
||||||
nsPIDOMWindow* window = ownerDoc->GetWindow();
|
MOZ_ASSERT(node, "ChromeOnly dispatch supported with Node targets only!");
|
||||||
|
nsPIDOMWindow* window = node->OwnerDoc()->GetWindow();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return NS_ERROR_INVALID_ARG;
|
return NS_ERROR_INVALID_ARG;
|
||||||
}
|
}
|
||||||
@ -52,18 +53,23 @@ AsyncEventDispatcher::Run()
|
|||||||
EventDispatcher::DispatchDOMEvent(target, nullptr, mEvent,
|
EventDispatcher::DispatchDOMEvent(target, nullptr, mEvent,
|
||||||
nullptr, nullptr);
|
nullptr, nullptr);
|
||||||
} else {
|
} else {
|
||||||
nsCOMPtr<EventTarget> target = mEventNode.get();
|
|
||||||
bool defaultActionEnabled; // This is not used because the caller is async
|
bool defaultActionEnabled; // This is not used because the caller is async
|
||||||
target->DispatchEvent(mEvent, &defaultActionEnabled);
|
mTarget->DispatchEvent(mEvent, &defaultActionEnabled);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nsIDocument* doc = mEventNode->OwnerDoc();
|
|
||||||
if (mDispatchChromeOnly) {
|
if (mDispatchChromeOnly) {
|
||||||
nsContentUtils::DispatchChromeEvent(doc, mEventNode, mEventType,
|
nsCOMPtr<nsINode> node = do_QueryInterface(mTarget);
|
||||||
|
MOZ_ASSERT(node, "ChromeOnly dispatch supported with Node targets only!");
|
||||||
|
nsContentUtils::DispatchChromeEvent(node->OwnerDoc(), node, mEventType,
|
||||||
mBubbles, false);
|
mBubbles, false);
|
||||||
} else {
|
} else {
|
||||||
nsContentUtils::DispatchTrustedEvent(doc, mEventNode, mEventType,
|
nsCOMPtr<nsIDOMEvent> event;
|
||||||
mBubbles, false);
|
NS_NewDOMEvent(getter_AddRefs(event), mTarget, nullptr, nullptr);
|
||||||
|
nsresult rv = event->InitEvent(mEventType, mBubbles, false);
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
event->SetTrusted(true);
|
||||||
|
bool dummy;
|
||||||
|
mTarget->DispatchEvent(event, &dummy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,12 +79,14 @@ AsyncEventDispatcher::Run()
|
|||||||
nsresult
|
nsresult
|
||||||
AsyncEventDispatcher::PostDOMEvent()
|
AsyncEventDispatcher::PostDOMEvent()
|
||||||
{
|
{
|
||||||
|
nsRefPtr<AsyncEventDispatcher> ensureDeletionWhenFailing = this;
|
||||||
return NS_DispatchToCurrentThread(this);
|
return NS_DispatchToCurrentThread(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AsyncEventDispatcher::RunDOMEventWhenSafe()
|
AsyncEventDispatcher::RunDOMEventWhenSafe()
|
||||||
{
|
{
|
||||||
|
nsRefPtr<AsyncEventDispatcher> ensureDeletionWhenFailing = this;
|
||||||
nsContentUtils::AddScriptRunner(this);
|
nsContentUtils::AddScriptRunner(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,29 +26,38 @@ namespace mozilla {
|
|||||||
class AsyncEventDispatcher : public nsRunnable
|
class AsyncEventDispatcher : public nsRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AsyncEventDispatcher(nsINode* aEventNode, const nsAString& aEventType,
|
AsyncEventDispatcher(nsINode* aTarget, const nsAString& aEventType,
|
||||||
bool aBubbles, bool aDispatchChromeOnly)
|
bool aBubbles, bool aDispatchChromeOnly)
|
||||||
: mEventNode(aEventNode)
|
: mTarget(aTarget)
|
||||||
, mEventType(aEventType)
|
, mEventType(aEventType)
|
||||||
, mBubbles(aBubbles)
|
, mBubbles(aBubbles)
|
||||||
, mDispatchChromeOnly(aDispatchChromeOnly)
|
, mDispatchChromeOnly(aDispatchChromeOnly)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AsyncEventDispatcher(nsINode* aEventNode, nsIDOMEvent* aEvent)
|
AsyncEventDispatcher(dom::EventTarget* aTarget, const nsAString& aEventType,
|
||||||
: mEventNode(aEventNode)
|
bool aBubbles)
|
||||||
|
: mTarget(aTarget)
|
||||||
|
, mEventType(aEventType)
|
||||||
|
, mBubbles(aBubbles)
|
||||||
|
, mDispatchChromeOnly(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
AsyncEventDispatcher(dom::EventTarget* aTarget, nsIDOMEvent* aEvent)
|
||||||
|
: mTarget(aTarget)
|
||||||
, mEvent(aEvent)
|
, mEvent(aEvent)
|
||||||
, mDispatchChromeOnly(false)
|
, mDispatchChromeOnly(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AsyncEventDispatcher(nsINode* aEventNode, WidgetEvent& aEvent);
|
AsyncEventDispatcher(dom::EventTarget* aTarget, WidgetEvent& aEvent);
|
||||||
|
|
||||||
NS_IMETHOD Run() MOZ_OVERRIDE;
|
NS_IMETHOD Run() MOZ_OVERRIDE;
|
||||||
nsresult PostDOMEvent();
|
nsresult PostDOMEvent();
|
||||||
void RunDOMEventWhenSafe();
|
void RunDOMEventWhenSafe();
|
||||||
|
|
||||||
nsCOMPtr<nsINode> mEventNode;
|
nsCOMPtr<dom::EventTarget> mTarget;
|
||||||
nsCOMPtr<nsIDOMEvent> mEvent;
|
nsCOMPtr<nsIDOMEvent> mEvent;
|
||||||
nsString mEventType;
|
nsString mEventType;
|
||||||
bool mBubbles;
|
bool mBubbles;
|
||||||
|
@ -501,6 +501,11 @@ nsTArray<ContentParent*>* ContentParent::sNonAppContentParents;
|
|||||||
nsTArray<ContentParent*>* ContentParent::sPrivateContent;
|
nsTArray<ContentParent*>* ContentParent::sPrivateContent;
|
||||||
StaticAutoPtr<LinkedList<ContentParent> > ContentParent::sContentParents;
|
StaticAutoPtr<LinkedList<ContentParent> > ContentParent::sContentParents;
|
||||||
|
|
||||||
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
// The pref updates sent to the Nuwa process.
|
||||||
|
static nsTArray<PrefSetting>* sNuwaPrefUpdates;
|
||||||
|
#endif
|
||||||
|
|
||||||
// This is true when subprocess launching is enabled. This is the
|
// This is true when subprocess launching is enabled. This is the
|
||||||
// case between StartUp() and ShutDown() or JoinAllSubprocesses().
|
// case between StartUp() and ShutDown() or JoinAllSubprocesses().
|
||||||
static bool sCanLaunchSubprocesses;
|
static bool sCanLaunchSubprocesses;
|
||||||
@ -1325,6 +1330,14 @@ ContentParent::ActorDestroy(ActorDestroyReason why)
|
|||||||
// remove the global remote preferences observers
|
// remove the global remote preferences observers
|
||||||
Preferences::RemoveObserver(this, "");
|
Preferences::RemoveObserver(this, "");
|
||||||
|
|
||||||
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
// Remove the pref update requests.
|
||||||
|
if (IsNuwaProcess() && sNuwaPrefUpdates) {
|
||||||
|
delete sNuwaPrefUpdates;
|
||||||
|
sNuwaPrefUpdates = nullptr;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RecvRemoveGeolocationListener();
|
RecvRemoveGeolocationListener();
|
||||||
|
|
||||||
mConsoleService = nullptr;
|
mConsoleService = nullptr;
|
||||||
@ -2115,6 +2128,13 @@ ContentParent::RecvAddNewProcess(const uint32_t& aPid,
|
|||||||
aPid,
|
aPid,
|
||||||
aFds);
|
aFds);
|
||||||
content->Init();
|
content->Init();
|
||||||
|
|
||||||
|
size_t numNuwaPrefUpdates = sNuwaPrefUpdates ?
|
||||||
|
sNuwaPrefUpdates->Length() : 0;
|
||||||
|
// Resend pref updates to the forked child.
|
||||||
|
for (int i = 0; i < numNuwaPrefUpdates; i++) {
|
||||||
|
content->SendPreferenceUpdate(sNuwaPrefUpdates->ElementAt(i));
|
||||||
|
}
|
||||||
PreallocatedProcessManager::PublishSpareProcess(content);
|
PreallocatedProcessManager::PublishSpareProcess(content);
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
@ -2162,9 +2182,22 @@ ContentParent::Observe(nsISupports* aSubject,
|
|||||||
|
|
||||||
PrefSetting pref(strData, null_t(), null_t());
|
PrefSetting pref(strData, null_t(), null_t());
|
||||||
Preferences::GetPreference(&pref);
|
Preferences::GetPreference(&pref);
|
||||||
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
if (IsNuwaProcess() && PreallocatedProcessManager::IsNuwaReady()) {
|
||||||
|
// Don't send the pref update to the Nuwa process. Save the update
|
||||||
|
// to send to the forked child.
|
||||||
|
if (!sNuwaPrefUpdates) {
|
||||||
|
sNuwaPrefUpdates = new nsTArray<PrefSetting>();
|
||||||
|
}
|
||||||
|
sNuwaPrefUpdates->AppendElement(pref);
|
||||||
|
} else if (!SendPreferenceUpdate(pref)) {
|
||||||
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (!SendPreferenceUpdate(pref)) {
|
if (!SendPreferenceUpdate(pref)) {
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (!strcmp(aTopic, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC)) {
|
else if (!strcmp(aTopic, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC)) {
|
||||||
NS_ConvertUTF16toUTF8 dataStr(aData);
|
NS_ConvertUTF16toUTF8 dataStr(aData);
|
||||||
|
@ -54,6 +54,7 @@ public:
|
|||||||
void DelayedNuwaFork();
|
void DelayedNuwaFork();
|
||||||
void PublishSpareProcess(ContentParent* aContent);
|
void PublishSpareProcess(ContentParent* aContent);
|
||||||
void MaybeForgetSpare(ContentParent* aContent);
|
void MaybeForgetSpare(ContentParent* aContent);
|
||||||
|
bool IsNuwaReady();
|
||||||
void OnNuwaReady();
|
void OnNuwaReady();
|
||||||
bool PreallocatedProcessReady();
|
bool PreallocatedProcessReady();
|
||||||
already_AddRefed<ContentParent> GetSpareProcess();
|
already_AddRefed<ContentParent> GetSpareProcess();
|
||||||
@ -340,6 +341,12 @@ PreallocatedProcessManagerImpl::MaybeForgetSpare(ContentParent* aContent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
PreallocatedProcessManagerImpl::IsNuwaReady()
|
||||||
|
{
|
||||||
|
return mIsNuwaReady;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PreallocatedProcessManagerImpl::OnNuwaReady()
|
PreallocatedProcessManagerImpl::OnNuwaReady()
|
||||||
{
|
{
|
||||||
@ -482,6 +489,12 @@ PreallocatedProcessManager::OnNuwaReady()
|
|||||||
GetPPMImpl()->OnNuwaReady();
|
GetPPMImpl()->OnNuwaReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */ bool
|
||||||
|
PreallocatedProcessManager::IsNuwaReady()
|
||||||
|
{
|
||||||
|
return GetPPMImpl()->IsNuwaReady();
|
||||||
|
}
|
||||||
|
|
||||||
/*static */ bool
|
/*static */ bool
|
||||||
PreallocatedProcessManager::PreallocatedProcessReady()
|
PreallocatedProcessManager::PreallocatedProcessReady()
|
||||||
{
|
{
|
||||||
|
@ -83,6 +83,7 @@ public:
|
|||||||
#ifdef MOZ_NUWA_PROCESS
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
static void PublishSpareProcess(ContentParent* aContent);
|
static void PublishSpareProcess(ContentParent* aContent);
|
||||||
static void MaybeForgetSpare(ContentParent* aContent);
|
static void MaybeForgetSpare(ContentParent* aContent);
|
||||||
|
static bool IsNuwaReady();
|
||||||
static void OnNuwaReady();
|
static void OnNuwaReady();
|
||||||
static bool PreallocatedProcessReady();
|
static bool PreallocatedProcessReady();
|
||||||
static void RunAfterPreallocatedProcessReady(nsIRunnable* aRunnable);
|
static void RunAfterPreallocatedProcessReady(nsIRunnable* aRunnable);
|
||||||
|
@ -2093,7 +2093,7 @@ MOZ_CXX11
|
|||||||
dnl Check for .hidden assembler directive and visibility attribute.
|
dnl Check for .hidden assembler directive and visibility attribute.
|
||||||
dnl Borrowed from glibc configure.in
|
dnl Borrowed from glibc configure.in
|
||||||
dnl ===============================================================
|
dnl ===============================================================
|
||||||
if test "$GNU_CC"; then
|
if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
|
||||||
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
|
||||||
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
|
||||||
if test -n "$gonkdir"; then
|
if test -n "$gonkdir"; then
|
||||||
|
@ -237,7 +237,7 @@ if (isAsmJSCompilationAvailable() && isCachingEnabled()) {
|
|||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
/* Implicit "use strict" context */
|
/* Implicit "use strict" context in modules */
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
var funcHeader = 'function (glob, ffi, heap) {',
|
var funcHeader = 'function (glob, ffi, heap) {',
|
||||||
@ -336,3 +336,33 @@ if (isAsmJSCompilationAvailable() && isCachingEnabled()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
/* Implicit "use strict" context in functions */
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
var funcCode = 'function g(x) {\n\
|
||||||
|
x=x|0;\n\
|
||||||
|
return x + 1 | 0;}';
|
||||||
|
var moduleCode = 'function () {\n\
|
||||||
|
"use asm";\n' + funcCode + '\n\
|
||||||
|
return g;\n\
|
||||||
|
}',
|
||||||
|
useStrict = '"use strict";';
|
||||||
|
|
||||||
|
var f5 = eval(useStrict + ";\n(" + moduleCode + "())");
|
||||||
|
|
||||||
|
var expectedToString = funcCode.replace('{', '{\n' + useStrict + '\n')
|
||||||
|
var expectedToSource = expectedToString
|
||||||
|
|
||||||
|
assertEq(f5.toString(), expectedToString);
|
||||||
|
assertEq(f5.toSource(), expectedToSource);
|
||||||
|
|
||||||
|
if (isAsmJSCompilationAvailable() && isCachingEnabled()) {
|
||||||
|
var mf5 = eval("\"use strict\";\n(" + moduleCode + ")");
|
||||||
|
assertEq(isAsmJSModuleLoadedFromCache(mf5), true);
|
||||||
|
var f5 = mf5();
|
||||||
|
assertEq(f5.toString(), expectedToString);
|
||||||
|
assertEq(f5.toSource(), expectedToSource);
|
||||||
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
|
@ -585,6 +585,7 @@ HandleDynamicLinkFailure(JSContext *cx, CallArgs args, AsmJSModule &module, Hand
|
|||||||
|
|
||||||
CompileOptions options(cx);
|
CompileOptions options(cx);
|
||||||
options.setOriginPrincipals(module.scriptSource()->originPrincipals())
|
options.setOriginPrincipals(module.scriptSource()->originPrincipals())
|
||||||
|
.setFile(module.scriptSource()->filename())
|
||||||
.setCompileAndGo(false)
|
.setCompileAndGo(false)
|
||||||
.setNoScriptRval(false);
|
.setNoScriptRval(false);
|
||||||
|
|
||||||
@ -860,6 +861,28 @@ js::IsAsmJSModule(HandleFunction fun)
|
|||||||
return fun->isNative() && fun->maybeNative() == LinkAsmJS;
|
return fun->isNative() && fun->maybeNative() == LinkAsmJS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
AppendUseStrictSource(JSContext *cx, HandleFunction fun, Handle<JSFlatString*> src, StringBuffer &out)
|
||||||
|
{
|
||||||
|
// We need to add "use strict" in the body right after the opening
|
||||||
|
// brace.
|
||||||
|
size_t bodyStart = 0, bodyEnd;
|
||||||
|
|
||||||
|
// No need to test for functions created with the Function ctor as
|
||||||
|
// these don't implicitly inherit the "use strict" context. Strict mode is
|
||||||
|
// enabled for functions created with the Function ctor only if they begin with
|
||||||
|
// the "use strict" directive, but these functions won't validate as asm.js
|
||||||
|
// modules.
|
||||||
|
|
||||||
|
ConstTwoByteChars chars(src->chars(), src->length());
|
||||||
|
if (!FindBody(cx, fun, chars, src->length(), &bodyStart, &bodyEnd))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return out.append(chars, bodyStart) &&
|
||||||
|
out.append("\n\"use strict\";\n") &&
|
||||||
|
out.append(chars + bodyStart, src->length() - bodyStart);
|
||||||
|
}
|
||||||
|
|
||||||
JSString *
|
JSString *
|
||||||
js::AsmJSModuleToString(JSContext *cx, HandleFunction fun, bool addParenToLambda)
|
js::AsmJSModuleToString(JSContext *cx, HandleFunction fun, bool addParenToLambda)
|
||||||
{
|
{
|
||||||
@ -909,26 +932,8 @@ js::AsmJSModuleToString(JSContext *cx, HandleFunction fun, bool addParenToLambda
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (module.strict()) {
|
if (module.strict()) {
|
||||||
// We need to add "use strict" in the body right after the opening
|
if (!AppendUseStrictSource(cx, fun, src, out))
|
||||||
// brace.
|
|
||||||
size_t bodyStart = 0, bodyEnd;
|
|
||||||
|
|
||||||
// No need to test for functions created with the Function ctor as
|
|
||||||
// these doesn't implicitly inherit the "use strict" context. Strict mode is
|
|
||||||
// enabled for functions created with the Function ctor only if they begin with
|
|
||||||
// the "use strict" directive, but these functions won't validate as asm.js
|
|
||||||
// modules.
|
|
||||||
|
|
||||||
ConstTwoByteChars chars(src->chars(), src->length());
|
|
||||||
if (!FindBody(cx, fun, chars, src->length(), &bodyStart, &bodyEnd))
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!out.append(chars, bodyStart) ||
|
|
||||||
!out.append("\n\"use strict\";\n") ||
|
|
||||||
!out.append(chars + bodyStart, src->length() - bodyStart))
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (!out.append(src->chars(), src->length()))
|
if (!out.append(src->chars(), src->length()))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -995,12 +1000,27 @@ js::AsmJSFunctionToString(JSContext *cx, HandleFunction fun)
|
|||||||
if (!out.append("function "))
|
if (!out.append("function "))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
Rooted<JSFlatString*> src(cx, source->substring(cx, begin, end));
|
if (module.strict()) {
|
||||||
if (!src)
|
// AppendUseStrictSource expects its input to start right after the
|
||||||
return nullptr;
|
// function name, so split the source chars from the src into two parts:
|
||||||
|
// the function name and the rest (arguments + body).
|
||||||
|
|
||||||
if (!out.append(src->chars(), src->length()))
|
// asm.js functions can't be anonymous
|
||||||
return nullptr;
|
JS_ASSERT(fun->atom());
|
||||||
|
if (!out.append(fun->atom()))
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
size_t nameEnd = begin + fun->atom()->length();
|
||||||
|
Rooted<JSFlatString*> src(cx, source->substring(cx, nameEnd, end));
|
||||||
|
if (!AppendUseStrictSource(cx, fun, src, out))
|
||||||
|
return nullptr;
|
||||||
|
} else {
|
||||||
|
Rooted<JSFlatString*> src(cx, source->substring(cx, begin, end));
|
||||||
|
if (!src)
|
||||||
|
return nullptr;
|
||||||
|
if (!out.append(src->chars(), src->length()))
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
return out.finishString();
|
return out.finishString();
|
||||||
}
|
}
|
||||||
|
@ -1567,71 +1567,71 @@ GenerateLIR(MIRGenerator *mir)
|
|||||||
|
|
||||||
AllocationIntegrityState integrity(*lir);
|
AllocationIntegrityState integrity(*lir);
|
||||||
|
|
||||||
TraceLogStartEvent(logger, TraceLogger::RegisterAllocation);
|
{
|
||||||
|
AutoTraceLog log(logger, TraceLogger::RegisterAllocation);
|
||||||
|
|
||||||
switch (mir->optimizationInfo().registerAllocator()) {
|
switch (mir->optimizationInfo().registerAllocator()) {
|
||||||
case RegisterAllocator_LSRA: {
|
case RegisterAllocator_LSRA: {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!integrity.record())
|
if (!integrity.record())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
||||||
if (!regalloc.go())
|
if (!regalloc.go())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!integrity.check(false))
|
if (!integrity.check(false))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RegisterAllocator_Backtracking: {
|
case RegisterAllocator_Backtracking: {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!integrity.record())
|
if (!integrity.record())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
||||||
if (!regalloc.go())
|
if (!regalloc.go())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!integrity.check(false))
|
if (!integrity.check(false))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IonSpewPass("Allocate Registers [Backtracking]");
|
IonSpewPass("Allocate Registers [Backtracking]");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case RegisterAllocator_Stupid: {
|
case RegisterAllocator_Stupid: {
|
||||||
// Use the integrity checker to populate safepoint information, so
|
// Use the integrity checker to populate safepoint information, so
|
||||||
// run it in all builds.
|
// run it in all builds.
|
||||||
if (!integrity.record())
|
if (!integrity.record())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
StupidAllocator regalloc(mir, &lirgen, *lir);
|
StupidAllocator regalloc(mir, &lirgen, *lir);
|
||||||
if (!regalloc.go())
|
if (!regalloc.go())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (!integrity.check(true))
|
if (!integrity.check(true))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
IonSpewPass("Allocate Registers [Stupid]");
|
IonSpewPass("Allocate Registers [Stupid]");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
MOZ_ASSUME_UNREACHABLE("Bad regalloc");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mir->shouldCancel("Allocate Registers"))
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mir->shouldCancel("Allocate Registers"))
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
TraceLogStopEvent(logger, TraceLogger::RegisterAllocation);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
AutoTraceLog log(logger, TraceLogger::UnsplitEdges);
|
AutoTraceLog log(logger, TraceLogger::UnsplitEdges);
|
||||||
// Now that all optimization and register allocation is done, re-introduce
|
// Now that all optimization and register allocation is done, re-introduce
|
||||||
|
@ -87,7 +87,7 @@ JSString::validateLength(js::ThreadSafeContext *maybecx, size_t length)
|
|||||||
MOZ_ALWAYS_INLINE void
|
MOZ_ALWAYS_INLINE void
|
||||||
JSRope::init(js::ThreadSafeContext *cx, JSString *left, JSString *right, size_t length)
|
JSRope::init(js::ThreadSafeContext *cx, JSString *left, JSString *right, size_t length)
|
||||||
{
|
{
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length, ROPE_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length, ROPE_FLAGS);
|
||||||
d.u1.left = left;
|
d.u1.left = left;
|
||||||
d.s.u2.right = right;
|
d.s.u2.right = right;
|
||||||
js::StringWriteBarrierPost(cx, &d.u1.left);
|
js::StringWriteBarrierPost(cx, &d.u1.left);
|
||||||
@ -122,7 +122,7 @@ JSDependentString::init(js::ThreadSafeContext *cx, JSLinearString *base, const j
|
|||||||
size_t length)
|
size_t length)
|
||||||
{
|
{
|
||||||
JS_ASSERT(!js::IsPoisonedPtr(base));
|
JS_ASSERT(!js::IsPoisonedPtr(base));
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS);
|
||||||
d.u1.chars = chars;
|
d.u1.chars = chars;
|
||||||
d.s.u2.base = base;
|
d.s.u2.base = base;
|
||||||
js::StringWriteBarrierPost(cx, reinterpret_cast<JSString **>(&d.s.u2.base));
|
js::StringWriteBarrierPost(cx, reinterpret_cast<JSString **>(&d.s.u2.base));
|
||||||
@ -185,7 +185,7 @@ JSString::markBase(JSTracer *trc)
|
|||||||
MOZ_ALWAYS_INLINE void
|
MOZ_ALWAYS_INLINE void
|
||||||
JSFlatString::init(const jschar *chars, size_t length)
|
JSFlatString::init(const jschar *chars, size_t length)
|
||||||
{
|
{
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||||
d.u1.chars = chars;
|
d.u1.chars = chars;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ JSInlineString::new_(js::ThreadSafeContext *cx)
|
|||||||
MOZ_ALWAYS_INLINE jschar *
|
MOZ_ALWAYS_INLINE jschar *
|
||||||
JSInlineString::init(size_t length)
|
JSInlineString::init(size_t length)
|
||||||
{
|
{
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||||
d.u1.chars = d.inlineStorage;
|
d.u1.chars = d.inlineStorage;
|
||||||
JS_ASSERT(lengthFits(length) || (isFatInline() && JSFatInlineString::lengthFits(length)));
|
JS_ASSERT(lengthFits(length) || (isFatInline() && JSFatInlineString::lengthFits(length)));
|
||||||
return d.inlineStorage;
|
return d.inlineStorage;
|
||||||
@ -238,7 +238,7 @@ JSInlineString::init(size_t length)
|
|||||||
MOZ_ALWAYS_INLINE void
|
MOZ_ALWAYS_INLINE void
|
||||||
JSInlineString::resetLength(size_t length)
|
JSInlineString::resetLength(size_t length)
|
||||||
{
|
{
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||||
JS_ASSERT(lengthFits(length) || (isFatInline() && JSFatInlineString::lengthFits(length)));
|
JS_ASSERT(lengthFits(length) || (isFatInline() && JSFatInlineString::lengthFits(length)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ JSExternalString::init(const jschar *chars, size_t length, const JSStringFinaliz
|
|||||||
{
|
{
|
||||||
JS_ASSERT(fin);
|
JS_ASSERT(fin);
|
||||||
JS_ASSERT(fin->finalize);
|
JS_ASSERT(fin->finalize);
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
|
||||||
d.u1.chars = chars;
|
d.u1.chars = chars;
|
||||||
d.s.u2.externalFinalizer = fin;
|
d.s.u2.externalFinalizer = fin;
|
||||||
}
|
}
|
||||||
|
@ -231,8 +231,7 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
* To avoid maintaining a stack, tree nodes are mutated to indicate how many
|
* To avoid maintaining a stack, tree nodes are mutated to indicate how many
|
||||||
* times they have been visited. Since ropes can be dags, a node may be
|
* times they have been visited. Since ropes can be dags, a node may be
|
||||||
* encountered multiple times during traversal. However, step 3 above leaves
|
* encountered multiple times during traversal. However, step 3 above leaves
|
||||||
* a valid dependent string, so everything works out. This algorithm is
|
* a valid dependent string, so everything works out.
|
||||||
* homomorphic to marking code.
|
|
||||||
*
|
*
|
||||||
* While ropes avoid all sorts of quadratic cases with string
|
* While ropes avoid all sorts of quadratic cases with string
|
||||||
* concatenation, they can't help when ropes are immediately flattened.
|
* concatenation, they can't help when ropes are immediately flattened.
|
||||||
@ -260,6 +259,14 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
JSString *str = this;
|
JSString *str = this;
|
||||||
jschar *pos;
|
jschar *pos;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JSString::flattenData is a tagged pointer to the parent node.
|
||||||
|
* The tag indicates what to do when we return to the parent.
|
||||||
|
*/
|
||||||
|
static const uintptr_t Tag_Mask = 0x3;
|
||||||
|
static const uintptr_t Tag_FinishNode = 0x0;
|
||||||
|
static const uintptr_t Tag_VisitRightChild = 0x1;
|
||||||
|
|
||||||
/* Find the left most string, containing the first string. */
|
/* Find the left most string, containing the first string. */
|
||||||
JSRope *leftMostRope = this;
|
JSRope *leftMostRope = this;
|
||||||
while (leftMostRope->leftChild()->isRope())
|
while (leftMostRope->leftChild()->isRope())
|
||||||
@ -273,16 +280,16 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
* Simulate a left-most traversal from the root to leftMost->leftChild()
|
* Simulate a left-most traversal from the root to leftMost->leftChild()
|
||||||
* via first_visit_node
|
* via first_visit_node
|
||||||
*/
|
*/
|
||||||
|
JS_ASSERT(str->isRope());
|
||||||
while (str != leftMostRope) {
|
while (str != leftMostRope) {
|
||||||
JS_ASSERT(str->isRope());
|
|
||||||
if (b == WithIncrementalBarrier) {
|
if (b == WithIncrementalBarrier) {
|
||||||
JSString::writeBarrierPre(str->d.u1.left);
|
JSString::writeBarrierPre(str->d.u1.left);
|
||||||
JSString::writeBarrierPre(str->d.s.u2.right);
|
JSString::writeBarrierPre(str->d.s.u2.right);
|
||||||
}
|
}
|
||||||
JSString *child = str->d.u1.left;
|
JSString *child = str->d.u1.left;
|
||||||
|
JS_ASSERT(child->isRope());
|
||||||
str->d.u1.chars = left.chars();
|
str->d.u1.chars = left.chars();
|
||||||
child->d.s.u3.parent = str;
|
child->d.u0.flattenData = uintptr_t(str) | Tag_VisitRightChild;
|
||||||
child->d.lengthAndFlags = 0x200;
|
|
||||||
str = child;
|
str = child;
|
||||||
}
|
}
|
||||||
if (b == WithIncrementalBarrier) {
|
if (b == WithIncrementalBarrier) {
|
||||||
@ -292,10 +299,10 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
str->d.u1.chars = left.chars();
|
str->d.u1.chars = left.chars();
|
||||||
wholeCapacity = capacity;
|
wholeCapacity = capacity;
|
||||||
wholeChars = const_cast<jschar *>(left.chars());
|
wholeChars = const_cast<jschar *>(left.chars());
|
||||||
size_t bits = left.d.lengthAndFlags;
|
size_t bits = left.d.u0.lengthAndFlags;
|
||||||
pos = wholeChars + (bits >> LENGTH_SHIFT);
|
pos = wholeChars + (bits >> LENGTH_SHIFT);
|
||||||
JS_STATIC_ASSERT(!(EXTENSIBLE_FLAGS & DEPENDENT_FLAGS));
|
JS_STATIC_ASSERT(!(EXTENSIBLE_FLAGS & DEPENDENT_FLAGS));
|
||||||
left.d.lengthAndFlags = bits ^ (EXTENSIBLE_FLAGS | DEPENDENT_FLAGS);
|
left.d.u0.lengthAndFlags = bits ^ (EXTENSIBLE_FLAGS | DEPENDENT_FLAGS);
|
||||||
left.d.s.u2.base = (JSLinearString *)this; /* will be true on exit */
|
left.d.s.u2.base = (JSLinearString *)this; /* will be true on exit */
|
||||||
StringWriteBarrierPostRemove(maybecx, &left.d.u1.left);
|
StringWriteBarrierPostRemove(maybecx, &left.d.u1.left);
|
||||||
StringWriteBarrierPost(maybecx, (JSString **)&left.d.s.u2.base);
|
StringWriteBarrierPost(maybecx, (JSString **)&left.d.s.u2.base);
|
||||||
@ -317,8 +324,8 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
str->d.u1.chars = pos;
|
str->d.u1.chars = pos;
|
||||||
StringWriteBarrierPostRemove(maybecx, &str->d.u1.left);
|
StringWriteBarrierPostRemove(maybecx, &str->d.u1.left);
|
||||||
if (left.isRope()) {
|
if (left.isRope()) {
|
||||||
left.d.s.u3.parent = str; /* Return to this when 'left' done, */
|
/* Return to this node when 'left' done, then goto visit_right_child. */
|
||||||
left.d.lengthAndFlags = 0x200; /* but goto visit_right_child. */
|
left.d.u0.flattenData = uintptr_t(str) | Tag_VisitRightChild;
|
||||||
str = &left;
|
str = &left;
|
||||||
goto first_visit_node;
|
goto first_visit_node;
|
||||||
}
|
}
|
||||||
@ -329,8 +336,8 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
visit_right_child: {
|
visit_right_child: {
|
||||||
JSString &right = *str->d.s.u2.right;
|
JSString &right = *str->d.s.u2.right;
|
||||||
if (right.isRope()) {
|
if (right.isRope()) {
|
||||||
right.d.s.u3.parent = str; /* Return to this node when 'right' done, */
|
/* Return to this node when 'right' done, then goto finish_node. */
|
||||||
right.d.lengthAndFlags = 0x300; /* but goto finish_node. */
|
right.d.u0.flattenData = uintptr_t(str) | Tag_FinishNode;
|
||||||
str = &right;
|
str = &right;
|
||||||
goto first_visit_node;
|
goto first_visit_node;
|
||||||
}
|
}
|
||||||
@ -342,21 +349,21 @@ JSRope::flattenInternal(ExclusiveContext *maybecx)
|
|||||||
if (str == this) {
|
if (str == this) {
|
||||||
JS_ASSERT(pos == wholeChars + wholeLength);
|
JS_ASSERT(pos == wholeChars + wholeLength);
|
||||||
*pos = '\0';
|
*pos = '\0';
|
||||||
str->d.lengthAndFlags = buildLengthAndFlags(wholeLength, EXTENSIBLE_FLAGS);
|
str->d.u0.lengthAndFlags = buildLengthAndFlags(wholeLength, EXTENSIBLE_FLAGS);
|
||||||
str->d.u1.chars = wholeChars;
|
str->d.u1.chars = wholeChars;
|
||||||
str->d.s.u2.capacity = wholeCapacity;
|
str->d.s.u2.capacity = wholeCapacity;
|
||||||
StringWriteBarrierPostRemove(maybecx, &str->d.u1.left);
|
StringWriteBarrierPostRemove(maybecx, &str->d.u1.left);
|
||||||
StringWriteBarrierPostRemove(maybecx, &str->d.s.u2.right);
|
StringWriteBarrierPostRemove(maybecx, &str->d.s.u2.right);
|
||||||
return &this->asFlat();
|
return &this->asFlat();
|
||||||
}
|
}
|
||||||
size_t progress = str->d.lengthAndFlags;
|
uintptr_t flattenData = str->d.u0.flattenData;
|
||||||
str->d.lengthAndFlags = buildLengthAndFlags(pos - str->d.u1.chars, DEPENDENT_FLAGS);
|
str->d.u0.lengthAndFlags = buildLengthAndFlags(pos - str->d.u1.chars, DEPENDENT_FLAGS);
|
||||||
str->d.s.u2.base = (JSLinearString *)this; /* will be true on exit */
|
str->d.s.u2.base = (JSLinearString *)this; /* will be true on exit */
|
||||||
StringWriteBarrierPost(maybecx, (JSString **)&str->d.s.u2.base);
|
StringWriteBarrierPost(maybecx, (JSString **)&str->d.s.u2.base);
|
||||||
str = str->d.s.u3.parent;
|
str = (JSString *)(flattenData & ~Tag_Mask);
|
||||||
if (progress == 0x200)
|
if ((flattenData & Tag_Mask) == Tag_VisitRightChild)
|
||||||
goto visit_right_child;
|
goto visit_right_child;
|
||||||
JS_ASSERT(progress == 0x300);
|
JS_ASSERT((flattenData & Tag_Mask) == Tag_FinishNode);
|
||||||
goto finish_node;
|
goto finish_node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -465,7 +472,7 @@ JSDependentString::undepend(ExclusiveContext *cx)
|
|||||||
* Transform *this into an undepended string so 'base' will remain rooted
|
* Transform *this into an undepended string so 'base' will remain rooted
|
||||||
* for the benefit of any other dependent string that depends on *this.
|
* for the benefit of any other dependent string that depends on *this.
|
||||||
*/
|
*/
|
||||||
d.lengthAndFlags = buildLengthAndFlags(n, UNDEPENDED_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(n, UNDEPENDED_FLAGS);
|
||||||
|
|
||||||
return &this->asFlat();
|
return &this->asFlat();
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,10 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
/* Fields only apply to string types commented on the right. */
|
/* Fields only apply to string types commented on the right. */
|
||||||
struct Data
|
struct Data
|
||||||
{
|
{
|
||||||
size_t lengthAndFlags; /* JSString */
|
union {
|
||||||
|
size_t lengthAndFlags; /* JSString */
|
||||||
|
uintptr_t flattenData; /* JSRope (temporary while flattening) */
|
||||||
|
} u0;
|
||||||
union {
|
union {
|
||||||
const jschar *chars; /* JSLinearString */
|
const jschar *chars; /* JSLinearString */
|
||||||
JSString *left; /* JSRope */
|
JSString *left; /* JSRope */
|
||||||
@ -150,10 +153,6 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
size_t capacity; /* JSFlatString (extensible) */
|
size_t capacity; /* JSFlatString (extensible) */
|
||||||
const JSStringFinalizer *externalFinalizer;/* JSExternalString */
|
const JSStringFinalizer *externalFinalizer;/* JSExternalString */
|
||||||
} u2;
|
} u2;
|
||||||
union {
|
|
||||||
JSString *parent; /* JSRope (temporary) */
|
|
||||||
size_t reserved; /* may use for bug 615290 */
|
|
||||||
} u3;
|
|
||||||
} s;
|
} s;
|
||||||
};
|
};
|
||||||
} d;
|
} d;
|
||||||
@ -252,12 +251,12 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
size_t length() const {
|
size_t length() const {
|
||||||
return d.lengthAndFlags >> LENGTH_SHIFT;
|
return d.u0.lengthAndFlags >> LENGTH_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool empty() const {
|
bool empty() const {
|
||||||
return d.lengthAndFlags <= FLAGS_MASK;
|
return d.u0.lengthAndFlags <= FLAGS_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -299,7 +298,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isRope() const {
|
bool isRope() const {
|
||||||
return (d.lengthAndFlags & FLAGS_MASK) == ROPE_FLAGS;
|
return (d.u0.lengthAndFlags & FLAGS_MASK) == ROPE_FLAGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
@ -321,7 +320,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isDependent() const {
|
bool isDependent() const {
|
||||||
return (d.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS;
|
return (d.u0.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
@ -343,7 +342,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isExtensible() const {
|
bool isExtensible() const {
|
||||||
return (d.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS;
|
return (d.u0.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
@ -376,17 +375,17 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isUndepended() const {
|
bool isUndepended() const {
|
||||||
return (d.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS;
|
return (d.u0.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isAtom() const {
|
bool isAtom() const {
|
||||||
return d.lengthAndFlags & ATOM_BIT;
|
return d.u0.lengthAndFlags & ATOM_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isPermanentAtom() const {
|
bool isPermanentAtom() const {
|
||||||
return (d.lengthAndFlags & FLAGS_MASK) == PERMANENT_ATOM_FLAGS;
|
return (d.u0.lengthAndFlags & FLAGS_MASK) == PERMANENT_ATOM_FLAGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
@ -399,7 +398,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
|
|
||||||
inline bool hasBase() const {
|
inline bool hasBase() const {
|
||||||
JS_STATIC_ASSERT((DEPENDENT_FLAGS | JS_BIT(1)) == UNDEPENDED_FLAGS);
|
JS_STATIC_ASSERT((DEPENDENT_FLAGS | JS_BIT(1)) == UNDEPENDED_FLAGS);
|
||||||
return d.lengthAndFlags & HAS_BASE_BIT;
|
return d.u0.lengthAndFlags & HAS_BASE_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline JSLinearString *base() const;
|
inline JSLinearString *base() const;
|
||||||
@ -417,7 +416,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
|
|||||||
/* Offsets for direct field from jit code. */
|
/* Offsets for direct field from jit code. */
|
||||||
|
|
||||||
static size_t offsetOfLengthAndFlags() {
|
static size_t offsetOfLengthAndFlags() {
|
||||||
return offsetof(JSString, d.lengthAndFlags);
|
return offsetof(JSString, d.u0.lengthAndFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t offsetOfChars() {
|
static size_t offsetOfChars() {
|
||||||
@ -594,11 +593,11 @@ class JSFlatString : public JSLinearString
|
|||||||
* operation changes the string to the JSAtom type, in place.
|
* operation changes the string to the JSAtom type, in place.
|
||||||
*/
|
*/
|
||||||
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoAtom() {
|
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoAtom() {
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length(), ATOM_BIT);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length(), ATOM_BIT);
|
||||||
return &asAtom();
|
return &asAtom();
|
||||||
}
|
}
|
||||||
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoPermanentAtom() {
|
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoPermanentAtom() {
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
||||||
return &asAtom();
|
return &asAtom();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -740,13 +739,13 @@ class JSAtom : public JSFlatString
|
|||||||
|
|
||||||
MOZ_ALWAYS_INLINE
|
MOZ_ALWAYS_INLINE
|
||||||
bool isPermanent() const {
|
bool isPermanent() const {
|
||||||
return d.lengthAndFlags & PERMANENT_BIT;
|
return d.u0.lengthAndFlags & PERMANENT_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transform this atom into a permanent atom. This is only done during
|
// Transform this atom into a permanent atom. This is only done during
|
||||||
// initialization of the runtime.
|
// initialization of the runtime.
|
||||||
MOZ_ALWAYS_INLINE void morphIntoPermanentAtom() {
|
MOZ_ALWAYS_INLINE void morphIntoPermanentAtom() {
|
||||||
d.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
d.u0.lengthAndFlags = buildLengthAndFlags(length(), PERMANENT_ATOM_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -1561,12 +1561,10 @@ GetAnimatedGeometryRootForFrame(nsIFrame* aFrame,
|
|||||||
if (!parent)
|
if (!parent)
|
||||||
break;
|
break;
|
||||||
nsIAtom* parentType = parent->GetType();
|
nsIAtom* parentType = parent->GetType();
|
||||||
#ifdef ANDROID
|
|
||||||
// Treat the slider thumb as being as an active scrolled root
|
// Treat the slider thumb as being as an active scrolled root
|
||||||
// on mobile so that it can move without repainting.
|
// so that it can move without repainting.
|
||||||
if (parentType == nsGkAtoms::sliderFrame)
|
if (parentType == nsGkAtoms::sliderFrame)
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
// Sticky frames are active if their nearest scrollable frame
|
// Sticky frames are active if their nearest scrollable frame
|
||||||
// is also active, just keep a record of sticky frames that we
|
// is also active, just keep a record of sticky frames that we
|
||||||
// encounter for now.
|
// encounter for now.
|
||||||
|
@ -845,7 +845,7 @@ skip-if(B2G&&browserIsRemote) == 401946-1.xul about:blank # bug 974780
|
|||||||
== 402567-1.html 402567-1-ref.html
|
== 402567-1.html 402567-1-ref.html
|
||||||
== 402567-2.html 402567-2-ref.html
|
== 402567-2.html 402567-2-ref.html
|
||||||
== 402567-3.html 402567-3-ref.html
|
== 402567-3.html 402567-3-ref.html
|
||||||
skip-if(B2G) == 402567-4.html 402567-4-ref.html
|
skip-if(B2G) fuzzy-if(gtk2Widget,2,40) == 402567-4.html 402567-4-ref.html
|
||||||
== 402629-1.html 402629-1-ref.html
|
== 402629-1.html 402629-1-ref.html
|
||||||
== 402629-2.html 402629-2-ref.html
|
== 402629-2.html 402629-2-ref.html
|
||||||
== 402629-3.html 402629-3-ref.html
|
== 402629-3.html 402629-3-ref.html
|
||||||
|
16
layout/reftests/forms/button/disabled-1-ref.html
Normal file
16
layout/reftests/forms/button/disabled-1-ref.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: test button "disabled" text style</title>
|
||||||
|
<style>
|
||||||
|
button {
|
||||||
|
color: GrayText;
|
||||||
|
border-width: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button>Some text</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
15
layout/reftests/forms/button/disabled-1.html
Normal file
15
layout/reftests/forms/button/disabled-1.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: test button "disabled" text style</title>
|
||||||
|
<style>
|
||||||
|
button {
|
||||||
|
border-width: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button disabled>Some text</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
17
layout/reftests/forms/button/disabled-2-ref.html
Normal file
17
layout/reftests/forms/button/disabled-2-ref.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: test all types of buttons look similar when disabled</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button>Some text</button>
|
||||||
|
<button>Some text</button>
|
||||||
|
<button>Reset</button>
|
||||||
|
<button>Submit Query</button>
|
||||||
|
<br>
|
||||||
|
<button disabled>Some text</button>
|
||||||
|
<button disabled>Some text</button>
|
||||||
|
<button disabled>Reset</button>
|
||||||
|
<button disabled>Submit Query</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
17
layout/reftests/forms/button/disabled-2.html
Normal file
17
layout/reftests/forms/button/disabled-2.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: test all types of buttons look similar when disabled</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button>Some text</button>
|
||||||
|
<input type="button" value="Some text">
|
||||||
|
<input type="reset">
|
||||||
|
<input type="submit">
|
||||||
|
<br>
|
||||||
|
<button disabled>Some text</button>
|
||||||
|
<input disabled type="button" value="Some text">
|
||||||
|
<input disabled type="reset">
|
||||||
|
<input disabled type="submit">
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-3-notref.html
Normal file
9
layout/reftests/forms/button/disabled-3-notref.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button disabled>Some text</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-3.html
Normal file
9
layout/reftests/forms/button/disabled-3.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<button>Some text</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-4-notref.html
Normal file
9
layout/reftests/forms/button/disabled-4-notref.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input disabled type="button" value="Some text">
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-4.html
Normal file
9
layout/reftests/forms/button/disabled-4.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input type="button" value="Some text">
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-5-notref.html
Normal file
9
layout/reftests/forms/button/disabled-5-notref.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input disabled type="reset">
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-5.html
Normal file
9
layout/reftests/forms/button/disabled-5.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input type="reset">
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-6-notref.html
Normal file
9
layout/reftests/forms/button/disabled-6-notref.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input disabled type="submit">
|
||||||
|
</body>
|
||||||
|
</html>
|
9
layout/reftests/forms/button/disabled-6.html
Normal file
9
layout/reftests/forms/button/disabled-6.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Bug 1007278: check disabled and non-disabled buttons look different</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<input type="submit">
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -17,3 +17,15 @@ fuzzy-if(B2G||Android,125,80) == percent-width-child-2.html percent-width-child
|
|||||||
!= line-height-button-1.5.html line-height-button-1.0.html
|
!= line-height-button-1.5.html line-height-button-1.0.html
|
||||||
!= line-height-input-0.5.html line-height-input-1.0.html
|
!= line-height-input-0.5.html line-height-input-1.0.html
|
||||||
!= line-height-input-1.5.html line-height-input-1.0.html
|
!= line-height-input-1.5.html line-height-input-1.0.html
|
||||||
|
|
||||||
|
# Looks like Android and B2G change the text color, but to something slightly
|
||||||
|
# different from ColorGray
|
||||||
|
fails-if(Android||B2G) == disabled-1.html disabled-1-ref.html
|
||||||
|
# While disabled buttons don't look like non-disabled buttons, <button disabled>
|
||||||
|
# is different from other disabled buttons for B2G ICS Emulator (see bug 1009714)
|
||||||
|
fails-if(B2G) == disabled-2.html disabled-2-ref.html
|
||||||
|
|
||||||
|
!= disabled-3.html disabled-3-notref.html
|
||||||
|
!= disabled-4.html disabled-4-notref.html
|
||||||
|
!= disabled-5.html disabled-5-notref.html
|
||||||
|
!= disabled-6.html disabled-6-notref.html
|
||||||
|
@ -17,7 +17,7 @@ random-if(d2d) == element-paint-transform-02.html element-paint-transform-02-ref
|
|||||||
== element-paint-background-size-02.html element-paint-background-size-02-ref.html
|
== element-paint-background-size-02.html element-paint-background-size-02-ref.html
|
||||||
== element-paint-transform-repeated.html element-paint-transform-repeated-ref.html
|
== element-paint-transform-repeated.html element-paint-transform-repeated-ref.html
|
||||||
fuzzy-if(d2d,255,24) == element-paint-transform-03.html element-paint-transform-03-ref.html
|
fuzzy-if(d2d,255,24) == element-paint-transform-03.html element-paint-transform-03-ref.html
|
||||||
== element-paint-native-widget.html element-paint-native-widget-ref.html
|
fuzzy-if(gtk2Widget,1,32) == element-paint-native-widget.html element-paint-native-widget-ref.html
|
||||||
== element-paint-subimage-sampling-restriction.html about:blank
|
== element-paint-subimage-sampling-restriction.html about:blank
|
||||||
== element-paint-clippath.html element-paint-clippath-ref.html
|
== element-paint-clippath.html element-paint-clippath-ref.html
|
||||||
== element-paint-sharpness-01a.html element-paint-sharpness-01b.html
|
== element-paint-sharpness-01a.html element-paint-sharpness-01b.html
|
||||||
|
@ -3,7 +3,7 @@ skip-if(B2G) == ellipsis-font-fallback.html ellipsis-font-fallback-ref.html
|
|||||||
skip-if(B2G) HTTP(..) == marker-basic.html marker-basic-ref.html
|
skip-if(B2G) HTTP(..) == marker-basic.html marker-basic-ref.html
|
||||||
skip-if(B2G) HTTP(..) == marker-string.html marker-string-ref.html
|
skip-if(B2G) HTTP(..) == marker-string.html marker-string-ref.html
|
||||||
skip-if(Android||B2G) HTTP(..) == bidi-simple.html bidi-simple-ref.html # Fails on Android due to anti-aliasing
|
skip-if(Android||B2G) HTTP(..) == bidi-simple.html bidi-simple-ref.html # Fails on Android due to anti-aliasing
|
||||||
skip-if(!gtk2Widget) HTTP(..) == bidi-simple-scrolled.html bidi-simple-scrolled-ref.html # Fails on Windows and OSX due to anti-aliasing
|
skip-if(!gtk2Widget) fuzzy-if(gtk2Widget,1,104) HTTP(..) == bidi-simple-scrolled.html bidi-simple-scrolled-ref.html # Fails on Windows and OSX due to anti-aliasing
|
||||||
skip-if(B2G) fuzzy-if(Android&&AndroidVersion<15,9,2545) fuzzy-if(Android&&AndroidVersion>=15,24,4000) HTTP(..) == scroll-rounding.html scroll-rounding-ref.html # bug 760264
|
skip-if(B2G) fuzzy-if(Android&&AndroidVersion<15,9,2545) fuzzy-if(Android&&AndroidVersion>=15,24,4000) HTTP(..) == scroll-rounding.html scroll-rounding-ref.html # bug 760264
|
||||||
fuzzy-if(OSX==10.8,1,1) HTTP(..) == anonymous-block.html anonymous-block-ref.html
|
fuzzy-if(OSX==10.8,1,1) HTTP(..) == anonymous-block.html anonymous-block-ref.html
|
||||||
skip-if(B2G) HTTP(..) == false-marker-overlap.html false-marker-overlap-ref.html
|
skip-if(B2G) HTTP(..) == false-marker-overlap.html false-marker-overlap-ref.html
|
||||||
|
@ -664,6 +664,7 @@ input[type="submit"]:disabled {
|
|||||||
cursor: inherit;
|
cursor: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button:disabled:active, button:disabled,
|
||||||
input[type="reset"]:disabled:active,
|
input[type="reset"]:disabled:active,
|
||||||
input[type="reset"]:disabled,
|
input[type="reset"]:disabled,
|
||||||
input[type="button"]:disabled:active,
|
input[type="button"]:disabled:active,
|
||||||
|
@ -664,11 +664,10 @@ nsSliderFrame::CurrentPositionChanged()
|
|||||||
else
|
else
|
||||||
newThumbRect.y = clientRect.y + NSToCoordRound(pos * mRatio);
|
newThumbRect.y = clientRect.y + NSToCoordRound(pos * mRatio);
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
|
||||||
// avoid putting the scroll thumb at subpixel positions which cause needless invalidations
|
// avoid putting the scroll thumb at subpixel positions which cause needless invalidations
|
||||||
nscoord appUnitsPerPixel = PresContext()->AppUnitsPerDevPixel();
|
nscoord appUnitsPerPixel = PresContext()->AppUnitsPerDevPixel();
|
||||||
newThumbRect = newThumbRect.ToNearestPixels(appUnitsPerPixel).ToAppUnits(appUnitsPerPixel);
|
newThumbRect = newThumbRect.ToNearestPixels(appUnitsPerPixel).ToAppUnits(appUnitsPerPixel);
|
||||||
#endif
|
|
||||||
// set the rect
|
// set the rect
|
||||||
thumbFrame->SetRect(newThumbRect);
|
thumbFrame->SetRect(newThumbRect);
|
||||||
|
|
||||||
|
2
mach
2
mach
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
# 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
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
@ -126,6 +126,19 @@ Http2Session::Http2Session(nsAHttpTransaction *aHttpTransaction,
|
|||||||
mPingThreshold = gHttpHandler->SpdyPingThreshold();
|
mPingThreshold = gHttpHandler->SpdyPingThreshold();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy the 32 bit number into the destination, using network byte order
|
||||||
|
// in the destination.
|
||||||
|
template<typename charType> static void
|
||||||
|
CopyAsNetwork32(charType dest, // where to store it
|
||||||
|
uint32_t number) // the 32 bit number in native format
|
||||||
|
{
|
||||||
|
number = PR_htonl(number);
|
||||||
|
memcpy(dest, &number, sizeof(number));
|
||||||
|
}
|
||||||
|
|
||||||
|
template void CopyAsNetwork32(char *dest, uint32_t number);
|
||||||
|
template void CopyAsNetwork32(uint8_t *dest, uint32_t number);
|
||||||
|
|
||||||
PLDHashOperator
|
PLDHashOperator
|
||||||
Http2Session::ShutdownEnumerator(nsAHttpTransaction *key,
|
Http2Session::ShutdownEnumerator(nsAHttpTransaction *key,
|
||||||
nsAutoPtr<Http2Stream> &stream,
|
nsAutoPtr<Http2Stream> &stream,
|
||||||
@ -601,12 +614,11 @@ Http2Session::CreateFrameHeader(charType dest, uint16_t frameLength,
|
|||||||
MOZ_ASSERT(!(streamID & 0x80000000));
|
MOZ_ASSERT(!(streamID & 0x80000000));
|
||||||
|
|
||||||
frameLength = PR_htons(frameLength);
|
frameLength = PR_htons(frameLength);
|
||||||
streamID = PR_htonl(streamID);
|
|
||||||
|
|
||||||
memcpy(dest, &frameLength, 2);
|
memcpy(dest, &frameLength, 2);
|
||||||
dest[2] = frameType;
|
dest[2] = frameType;
|
||||||
dest[3] = frameFlags;
|
dest[3] = frameFlags;
|
||||||
memcpy(dest + 4, &streamID, 4);
|
CopyAsNetwork32(dest + 4, streamID);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -710,7 +722,7 @@ Http2Session::GeneratePriority(uint32_t aID, uint8_t aPriorityWeight)
|
|||||||
mOutputQueueUsed += 13;
|
mOutputQueueUsed += 13;
|
||||||
|
|
||||||
CreateFrameHeader(packet, 5, FRAME_TYPE_PRIORITY, 0, aID);
|
CreateFrameHeader(packet, 5, FRAME_TYPE_PRIORITY, 0, aID);
|
||||||
memset(packet + 8, 0, 4);
|
CopyAsNetwork32(packet + 8, 0);
|
||||||
memcpy(packet + 12, &aPriorityWeight, 1);
|
memcpy(packet + 12, &aPriorityWeight, 1);
|
||||||
LogIO(this, nullptr, "Generate Priority", packet, 13);
|
LogIO(this, nullptr, "Generate Priority", packet, 13);
|
||||||
FlushOutputQueue();
|
FlushOutputQueue();
|
||||||
@ -736,8 +748,7 @@ Http2Session::GenerateRstStream(uint32_t aStatusCode, uint32_t aID)
|
|||||||
mOutputQueueUsed += 12;
|
mOutputQueueUsed += 12;
|
||||||
CreateFrameHeader(packet, 4, FRAME_TYPE_RST_STREAM, 0, aID);
|
CreateFrameHeader(packet, 4, FRAME_TYPE_RST_STREAM, 0, aID);
|
||||||
|
|
||||||
aStatusCode = PR_htonl(aStatusCode);
|
CopyAsNetwork32(packet + 8, aStatusCode);
|
||||||
memcpy(packet + 8, &aStatusCode, 4);
|
|
||||||
|
|
||||||
LogIO(this, nullptr, "Generate Reset", packet, 12);
|
LogIO(this, nullptr, "Generate Reset", packet, 12);
|
||||||
FlushOutputQueue();
|
FlushOutputQueue();
|
||||||
@ -755,12 +766,10 @@ Http2Session::GenerateGoAway(uint32_t aStatusCode)
|
|||||||
CreateFrameHeader(packet, 8, FRAME_TYPE_GOAWAY, 0, 0);
|
CreateFrameHeader(packet, 8, FRAME_TYPE_GOAWAY, 0, 0);
|
||||||
|
|
||||||
// last-good-stream-id are bytes 8-11 reflecting pushes
|
// last-good-stream-id are bytes 8-11 reflecting pushes
|
||||||
uint32_t goAway = PR_htonl(mOutgoingGoAwayID);
|
CopyAsNetwork32(packet + 8, mOutgoingGoAwayID);
|
||||||
memcpy(packet + 8, &goAway, 4);
|
|
||||||
|
|
||||||
// bytes 12-15 are the status code.
|
// bytes 12-15 are the status code.
|
||||||
aStatusCode = PR_htonl(aStatusCode);
|
CopyAsNetwork32(packet + 12, aStatusCode);
|
||||||
memcpy(packet + 12, &aStatusCode, 4);
|
|
||||||
|
|
||||||
LogIO(this, nullptr, "Generate GoAway", packet, 16);
|
LogIO(this, nullptr, "Generate GoAway", packet, 16);
|
||||||
FlushOutputQueue();
|
FlushOutputQueue();
|
||||||
@ -812,8 +821,7 @@ Http2Session::SendHello()
|
|||||||
// Advertise the Push RWIN for the session, and on each new pull stream
|
// Advertise the Push RWIN for the session, and on each new pull stream
|
||||||
// send a window update with END_FLOW_CONTROL
|
// send a window update with END_FLOW_CONTROL
|
||||||
packet[8 + 5 * numberOfEntries] = SETTINGS_TYPE_INITIAL_WINDOW;
|
packet[8 + 5 * numberOfEntries] = SETTINGS_TYPE_INITIAL_WINDOW;
|
||||||
uint32_t rwin = PR_htonl(mPushAllowance);
|
CopyAsNetwork32(packet + 9 + 5 * numberOfEntries, mPushAllowance);
|
||||||
memcpy(packet + 9 + 5 * numberOfEntries, &rwin, 4);
|
|
||||||
numberOfEntries++;
|
numberOfEntries++;
|
||||||
|
|
||||||
// Explicitly signal that we do NOT support compressed data frames, even
|
// Explicitly signal that we do NOT support compressed data frames, even
|
||||||
@ -835,16 +843,15 @@ Http2Session::SendHello()
|
|||||||
goto sendHello_complete;
|
goto sendHello_complete;
|
||||||
|
|
||||||
// send a window update for the session (Stream 0) for something large
|
// send a window update for the session (Stream 0) for something large
|
||||||
sessionWindowBump = PR_htonl(sessionWindowBump);
|
|
||||||
mLocalSessionWindow = ASpdySession::kInitialRwin;
|
mLocalSessionWindow = ASpdySession::kInitialRwin;
|
||||||
|
|
||||||
packet = mOutputQueueBuffer.get() + mOutputQueueUsed;
|
packet = mOutputQueueBuffer.get() + mOutputQueueUsed;
|
||||||
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0);
|
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0);
|
||||||
mOutputQueueUsed += 12;
|
mOutputQueueUsed += 12;
|
||||||
memcpy(packet + 8, &sessionWindowBump, 4);
|
CopyAsNetwork32(packet + 8, sessionWindowBump);
|
||||||
|
|
||||||
LOG3(("Session Window increase at start of session %p %u\n",
|
LOG3(("Session Window increase at start of session %p %u\n",
|
||||||
this, PR_ntohl(sessionWindowBump)));
|
this, sessionWindowBump));
|
||||||
LogIO(this, nullptr, "Session Window Bump ", packet, 12);
|
LogIO(this, nullptr, "Session Window Bump ", packet, 12);
|
||||||
|
|
||||||
sendHello_complete:
|
sendHello_complete:
|
||||||
@ -2480,8 +2487,7 @@ Http2Session::UpdateLocalStreamWindow(Http2Stream *stream, uint32_t bytes)
|
|||||||
MOZ_ASSERT(mOutputQueueUsed <= mOutputQueueSize);
|
MOZ_ASSERT(mOutputQueueUsed <= mOutputQueueSize);
|
||||||
|
|
||||||
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, stream->StreamID());
|
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, stream->StreamID());
|
||||||
toack = PR_htonl(toack);
|
CopyAsNetwork32(packet + 8, toack);
|
||||||
memcpy(packet + 8, &toack, 4);
|
|
||||||
|
|
||||||
LogIO(this, stream, "Stream Window Update", packet, 12);
|
LogIO(this, stream, "Stream Window Update", packet, 12);
|
||||||
// dont flush here, this write can commonly be coalesced with a
|
// dont flush here, this write can commonly be coalesced with a
|
||||||
@ -2519,8 +2525,7 @@ Http2Session::UpdateLocalSessionWindow(uint32_t bytes)
|
|||||||
MOZ_ASSERT(mOutputQueueUsed <= mOutputQueueSize);
|
MOZ_ASSERT(mOutputQueueUsed <= mOutputQueueSize);
|
||||||
|
|
||||||
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0);
|
CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0);
|
||||||
toack = PR_htonl(toack);
|
CopyAsNetwork32(packet + 8, toack);
|
||||||
memcpy(packet + 8, &toack, 4);
|
|
||||||
|
|
||||||
LogIO(this, nullptr, "Session Window Update", packet, 12);
|
LogIO(this, nullptr, "Session Window Update", packet, 12);
|
||||||
// dont flush here, this write can commonly be coalesced with others
|
// dont flush here, this write can commonly be coalesced with others
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2012 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||||
# Copyright 2013 Mozilla Foundation
|
# This code is made available to you under your choice of the following sets
|
||||||
|
# of licensing terms:
|
||||||
|
#
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
#
|
||||||
|
# Copyright 2013 Mozilla Contributors
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||||
/* Copyright 2013 Mozilla Foundation
|
/* This code is made available to you under your choice of the following sets
|
||||||
|
* of licensing terms:
|
||||||
|
*/
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
/* Copyright 2013 Mozilla Contributors
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
69
toolkit/mozapps/update/UpdaterHealthProvider.jsm
Normal file
69
toolkit/mozapps/update/UpdaterHealthProvider.jsm
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
this.EXPORTED_SYMBOLS = [
|
||||||
|
"UpdateProvider",
|
||||||
|
];
|
||||||
|
|
||||||
|
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||||
|
|
||||||
|
Cu.import("resource://gre/modules/Metrics.jsm", this);
|
||||||
|
Cu.import("resource://gre/modules/Task.jsm", this);
|
||||||
|
|
||||||
|
const DAILY_COUNTER_FIELD = {type: Metrics.Storage.FIELD_DAILY_COUNTER};
|
||||||
|
const DAILY_DISCRETE_NUMERIC_FIELD = {type: Metrics.Storage.FIELD_DAILY_DISCRETE_NUMERIC};
|
||||||
|
|
||||||
|
function UpdateMeasurement1() {
|
||||||
|
Metrics.Measurement.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateMeasurement1.prototype = Object.freeze({
|
||||||
|
__proto__: Metrics.Measurement.prototype,
|
||||||
|
|
||||||
|
name: "update",
|
||||||
|
version: 1,
|
||||||
|
|
||||||
|
fields: {
|
||||||
|
updateCheckStartCount: DAILY_COUNTER_FIELD,
|
||||||
|
updateCheckSuccessCount: DAILY_COUNTER_FIELD,
|
||||||
|
updateCheckFailedCount: DAILY_COUNTER_FIELD,
|
||||||
|
updateCheckFailedStatuses: DAILY_DISCRETE_NUMERIC_FIELD,
|
||||||
|
completeUpdateStartCount: DAILY_COUNTER_FIELD,
|
||||||
|
partialUpdateStartCount: DAILY_COUNTER_FIELD,
|
||||||
|
completeUpdateSuccessCount: DAILY_COUNTER_FIELD,
|
||||||
|
partialUpdateSuccessCount: DAILY_COUNTER_FIELD,
|
||||||
|
updateFailedCount: DAILY_COUNTER_FIELD,
|
||||||
|
updateFailedStatuses: DAILY_DISCRETE_NUMERIC_FIELD,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
this.UpdateProvider = function () {
|
||||||
|
Metrics.Provider.call(this);
|
||||||
|
};
|
||||||
|
UpdateProvider.prototype = Object.freeze({
|
||||||
|
__proto__: Metrics.Provider.prototype,
|
||||||
|
|
||||||
|
name: "org.mozilla.update",
|
||||||
|
|
||||||
|
measurementTypes: [
|
||||||
|
UpdateMeasurement1,
|
||||||
|
],
|
||||||
|
|
||||||
|
recordUpdate: function (field, status) {
|
||||||
|
let m = this.getMeasurement(UpdateMeasurement1.prototype.name,
|
||||||
|
UpdateMeasurement1.prototype.version);
|
||||||
|
|
||||||
|
return this.enqueueStorageOperation(function recordUpdateFields() {
|
||||||
|
return Task.spawn(function recordUpdateFieldsTask() {
|
||||||
|
yield m.incrementDailyCounter(field + "Count");
|
||||||
|
|
||||||
|
if ((field == "updateFailed" || field == "updateCheckFailed") && status) {
|
||||||
|
yield m.addDailyDiscreteNumeric(field + "Statuses", status);
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
|
}.bind(this));
|
||||||
|
},
|
||||||
|
});
|
@ -46,4 +46,8 @@ if CONFIG['MOZ_UPDATER']:
|
|||||||
'nsUpdateServiceStub.js',
|
'nsUpdateServiceStub.js',
|
||||||
]
|
]
|
||||||
|
|
||||||
JAR_MANIFESTS += ['jar.mn']
|
EXTRA_JS_MODULES += [
|
||||||
|
'UpdaterHealthProvider.jsm'
|
||||||
|
]
|
||||||
|
|
||||||
|
JAR_MANIFESTS += ['jar.mn']
|
||||||
|
@ -12,6 +12,7 @@ Components.utils.import("resource://gre/modules/FileUtils.jsm");
|
|||||||
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
||||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
||||||
|
Components.utils.import("resource://gre/modules/UpdaterHealthProvider.jsm");
|
||||||
|
|
||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
@ -258,6 +259,18 @@ const PING_BGUC_ADDON_UPDATES_FOR_INCOMPAT = 29;
|
|||||||
// Incompatible add-ons found (update notification)
|
// Incompatible add-ons found (update notification)
|
||||||
const PING_BGUC_ADDON_HAVE_INCOMPAT = 30;
|
const PING_BGUC_ADDON_HAVE_INCOMPAT = 30;
|
||||||
|
|
||||||
|
// Health report field names
|
||||||
|
const UpdaterHealthReportFields = {
|
||||||
|
CHECK_START: "updateCheckStart",
|
||||||
|
CHECK_SUCCESS: "updateCheckSuccess",
|
||||||
|
CHECK_FAILED: "updateCheckFailed",
|
||||||
|
COMPLETE_START: "completeUpdateStart",
|
||||||
|
PARTIAL_START: "partialUpdateStart",
|
||||||
|
COMPLETE_SUCCESS: "completeUpdateSuccess",
|
||||||
|
PARTIAL_SUCCESS: "partialUpdateSuccess",
|
||||||
|
FAILED: "updateFailed"
|
||||||
|
};
|
||||||
|
|
||||||
var gLocale = null;
|
var gLocale = null;
|
||||||
var gUpdateMutexHandle = null;
|
var gUpdateMutexHandle = null;
|
||||||
|
|
||||||
@ -935,6 +948,37 @@ function getStatusTextFromCode(code, defaultCode) {
|
|||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Record count in the health report.
|
||||||
|
* @param field
|
||||||
|
* The field name to record
|
||||||
|
* @param status
|
||||||
|
* Status code for errors, 0 otherwise
|
||||||
|
*/
|
||||||
|
function recordInHealthReport(field, status) {
|
||||||
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
|
try {
|
||||||
|
LOG("recordInHealthReport - " + field + " - " + status);
|
||||||
|
|
||||||
|
let reporter = Cc["@mozilla.org/datareporting/service;1"]
|
||||||
|
.getService().wrappedJSObject.healthReporter;
|
||||||
|
|
||||||
|
if (reporter) {
|
||||||
|
reporter.onInit().then(function recordUpdateInHealthReport() {
|
||||||
|
try {
|
||||||
|
reporter.getProvider("org.mozilla.update").recordUpdate(field, status);
|
||||||
|
} catch (ex) {
|
||||||
|
Cu.reportError(ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// If getting the heath reporter service fails, don't fail updating.
|
||||||
|
} catch (ex) {
|
||||||
|
LOG("recordInHealthReport - could not initialize health reporter");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Active Updates directory
|
* Get the Active Updates directory
|
||||||
* @return The active updates directory, as a nsIFile object
|
* @return The active updates directory, as a nsIFile object
|
||||||
@ -3600,6 +3644,8 @@ Checker.prototype = {
|
|||||||
if (!url || (!this.enabled && !force))
|
if (!url || (!this.enabled && !force))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
recordInHealthReport(UpdaterHealthReportFields.CHECK_START, 0);
|
||||||
|
|
||||||
this._request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
|
this._request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
|
||||||
createInstance(Ci.nsISupports);
|
createInstance(Ci.nsISupports);
|
||||||
// This is here to let unit test code override XHR
|
// This is here to let unit test code override XHR
|
||||||
@ -3723,6 +3769,8 @@ Checker.prototype = {
|
|||||||
if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS))
|
if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS))
|
||||||
Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDERRORS);
|
Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDERRORS);
|
||||||
|
|
||||||
|
recordInHealthReport(UpdaterHealthReportFields.CHECK_SUCCESS, 0);
|
||||||
|
|
||||||
// Tell the callback about the updates
|
// Tell the callback about the updates
|
||||||
this._callback.onCheckComplete(event.target, updates, updates.length);
|
this._callback.onCheckComplete(event.target, updates, updates.length);
|
||||||
}
|
}
|
||||||
@ -3743,6 +3791,9 @@ Checker.prototype = {
|
|||||||
update.errorCode = updates[0] ? CERT_ATTR_CHECK_FAILED_HAS_UPDATE
|
update.errorCode = updates[0] ? CERT_ATTR_CHECK_FAILED_HAS_UPDATE
|
||||||
: CERT_ATTR_CHECK_FAILED_NO_UPDATE;
|
: CERT_ATTR_CHECK_FAILED_NO_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recordInHealthReport(UpdaterHealthReportFields.CHECK_FAILED, update.errorCode);
|
||||||
|
|
||||||
this._callback.onError(request, update);
|
this._callback.onError(request, update);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3774,6 +3825,8 @@ Checker.prototype = {
|
|||||||
update.errorCode = HTTP_ERROR_OFFSET + status;
|
update.errorCode = HTTP_ERROR_OFFSET + status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recordInHealthReport(UpdaterHealthReportFields.CHECK_FAILED, update.errorCode);
|
||||||
|
|
||||||
this._callback.onError(request, update);
|
this._callback.onError(request, update);
|
||||||
|
|
||||||
this._request = null;
|
this._request = null;
|
||||||
@ -4088,6 +4141,10 @@ Downloader.prototype = {
|
|||||||
}
|
}
|
||||||
this.isCompleteUpdate = this._patch.type == "complete";
|
this.isCompleteUpdate = this._patch.type == "complete";
|
||||||
|
|
||||||
|
recordInHealthReport(
|
||||||
|
this.isCompleteUpdate ? UpdaterHealthReportFields.COMPLETE_START :
|
||||||
|
UpdaterHealthReportFields.PARTIAL_START, 0);
|
||||||
|
|
||||||
var patchFile = null;
|
var patchFile = null;
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
#ifdef MOZ_WIDGET_GONK
|
||||||
@ -4343,6 +4400,10 @@ Downloader.prototype = {
|
|||||||
"current fail: " + this.updateService._consecutiveSocketErrors + ", " +
|
"current fail: " + this.updateService._consecutiveSocketErrors + ", " +
|
||||||
"max fail: " + maxFail + ", " + "retryTimeout: " + retryTimeout);
|
"max fail: " + maxFail + ", " + "retryTimeout: " + retryTimeout);
|
||||||
if (Components.isSuccessCode(status)) {
|
if (Components.isSuccessCode(status)) {
|
||||||
|
recordInHealthReport(
|
||||||
|
this.isCompleteUpdate ? UpdaterHealthReportFields.COMPLETE_SUCCESS :
|
||||||
|
UpdaterHealthReportFields.PARTIAL_SUCCESS, 0);
|
||||||
|
|
||||||
if (this._verifyDownload()) {
|
if (this._verifyDownload()) {
|
||||||
state = shouldUseService() ? STATE_PENDING_SVC : STATE_PENDING;
|
state = shouldUseService() ? STATE_PENDING_SVC : STATE_PENDING;
|
||||||
if (this.background) {
|
if (this.background) {
|
||||||
@ -4371,49 +4432,53 @@ Downloader.prototype = {
|
|||||||
// Destroy the updates directory, since we're done with it.
|
// Destroy the updates directory, since we're done with it.
|
||||||
cleanUpUpdatesDir();
|
cleanUpUpdatesDir();
|
||||||
}
|
}
|
||||||
} else if (status == Cr.NS_ERROR_OFFLINE) {
|
} else {
|
||||||
// Register an online observer to try again.
|
recordInHealthReport(UpdaterHealthReportFields.FAILED, status);
|
||||||
// The online observer will continue the incremental download by
|
|
||||||
// calling downloadUpdate on the active update which continues
|
|
||||||
// downloading the file from where it was.
|
|
||||||
LOG("Downloader:onStopRequest - offline, register online observer: true");
|
|
||||||
shouldRegisterOnlineObserver = true;
|
|
||||||
deleteActiveUpdate = false;
|
|
||||||
// Each of NS_ERROR_NET_TIMEOUT, ERROR_CONNECTION_REFUSED, and
|
|
||||||
// NS_ERROR_NET_RESET can be returned when disconnecting the internet while
|
|
||||||
// a download of a MAR is in progress. There may be others but I have not
|
|
||||||
// encountered them during testing.
|
|
||||||
} else if ((status == Cr.NS_ERROR_NET_TIMEOUT ||
|
|
||||||
status == Cr.NS_ERROR_CONNECTION_REFUSED ||
|
|
||||||
status == Cr.NS_ERROR_NET_RESET) &&
|
|
||||||
this.updateService._consecutiveSocketErrors < maxFail) {
|
|
||||||
LOG("Downloader:onStopRequest - socket error, shouldRetrySoon: true");
|
|
||||||
shouldRetrySoon = true;
|
|
||||||
deleteActiveUpdate = false;
|
|
||||||
} else if (status != Cr.NS_BINDING_ABORTED &&
|
|
||||||
status != Cr.NS_ERROR_ABORT &&
|
|
||||||
status != Cr.NS_ERROR_DOCUMENT_NOT_CACHED) {
|
|
||||||
LOG("Downloader:onStopRequest - non-verification failure");
|
|
||||||
// Some sort of other failure, log this in the |statusText| property
|
|
||||||
state = STATE_DOWNLOAD_FAILED;
|
|
||||||
|
|
||||||
// XXXben - if |request| (The Incremental Download) provided a means
|
if (status == Cr.NS_ERROR_OFFLINE) {
|
||||||
// for accessing the http channel we could do more here.
|
// Register an online observer to try again.
|
||||||
|
// The online observer will continue the incremental download by
|
||||||
|
// calling downloadUpdate on the active update which continues
|
||||||
|
// downloading the file from where it was.
|
||||||
|
LOG("Downloader:onStopRequest - offline, register online observer: true");
|
||||||
|
shouldRegisterOnlineObserver = true;
|
||||||
|
deleteActiveUpdate = false;
|
||||||
|
// Each of NS_ERROR_NET_TIMEOUT, ERROR_CONNECTION_REFUSED, and
|
||||||
|
// NS_ERROR_NET_RESET can be returned when disconnecting the internet while
|
||||||
|
// a download of a MAR is in progress. There may be others but I have not
|
||||||
|
// encountered them during testing.
|
||||||
|
} else if ((status == Cr.NS_ERROR_NET_TIMEOUT ||
|
||||||
|
status == Cr.NS_ERROR_CONNECTION_REFUSED ||
|
||||||
|
status == Cr.NS_ERROR_NET_RESET) &&
|
||||||
|
this.updateService._consecutiveSocketErrors < maxFail) {
|
||||||
|
LOG("Downloader:onStopRequest - socket error, shouldRetrySoon: true");
|
||||||
|
shouldRetrySoon = true;
|
||||||
|
deleteActiveUpdate = false;
|
||||||
|
} else if (status != Cr.NS_BINDING_ABORTED &&
|
||||||
|
status != Cr.NS_ERROR_ABORT &&
|
||||||
|
status != Cr.NS_ERROR_DOCUMENT_NOT_CACHED) {
|
||||||
|
LOG("Downloader:onStopRequest - non-verification failure");
|
||||||
|
// Some sort of other failure, log this in the |statusText| property
|
||||||
|
state = STATE_DOWNLOAD_FAILED;
|
||||||
|
|
||||||
this._update.statusText = getStatusTextFromCode(status,
|
// XXXben - if |request| (The Incremental Download) provided a means
|
||||||
Cr.NS_BINDING_FAILED);
|
// for accessing the http channel we could do more here.
|
||||||
|
|
||||||
|
this._update.statusText = getStatusTextFromCode(status,
|
||||||
|
Cr.NS_BINDING_FAILED);
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_GONK
|
#ifdef MOZ_WIDGET_GONK
|
||||||
// bug891009: On FirefoxOS, manaully retry OTA download will reuse
|
// bug891009: On FirefoxOS, manaully retry OTA download will reuse
|
||||||
// the Update object. We need to remove selected patch so that download
|
// the Update object. We need to remove selected patch so that download
|
||||||
// can be triggered again successfully.
|
// can be triggered again successfully.
|
||||||
this._update.selectedPatch.selected = false;
|
this._update.selectedPatch.selected = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Destroy the updates directory, since we're done with it.
|
// Destroy the updates directory, since we're done with it.
|
||||||
cleanUpUpdatesDir();
|
cleanUpUpdatesDir();
|
||||||
|
|
||||||
deleteActiveUpdate = true;
|
deleteActiveUpdate = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LOG("Downloader:onStopRequest - setting state to: " + state);
|
LOG("Downloader:onStopRequest - setting state to: " + state);
|
||||||
this._patch.state = state;
|
this._patch.state = state;
|
||||||
|
@ -10,3 +10,6 @@ contract @mozilla.org/updates/update-prompt;1 {27ABA825-35B5-4018-9FDD-F99250A0E
|
|||||||
component {e43b0010-04ba-4da6-b523-1f92580bc150} nsUpdateServiceStub.js
|
component {e43b0010-04ba-4da6-b523-1f92580bc150} nsUpdateServiceStub.js
|
||||||
contract @mozilla.org/updates/update-service-stub;1 {e43b0010-04ba-4da6-b523-1f92580bc150}
|
contract @mozilla.org/updates/update-service-stub;1 {e43b0010-04ba-4da6-b523-1f92580bc150}
|
||||||
category profile-after-change nsUpdateServiceStub @mozilla.org/updates/update-service-stub;1
|
category profile-after-change nsUpdateServiceStub @mozilla.org/updates/update-service-stub;1
|
||||||
|
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||||
|
category healthreport-js-provider-default UpdateProvider resource://gre/modules/UpdaterHealthProvider.jsm
|
||||||
|
#endif
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
|
||||||
|
|
||||||
|
|
||||||
|
Cu.import("resource://gre/modules/Metrics.jsm");
|
||||||
|
Cu.import("resource://gre/modules/UpdaterHealthProvider.jsm");
|
||||||
|
|
||||||
|
// Create a profile
|
||||||
|
let gProfile = do_get_profile();
|
||||||
|
|
||||||
|
function run_test() {
|
||||||
|
run_next_test();
|
||||||
|
}
|
||||||
|
|
||||||
|
add_test(function test_constructor() {
|
||||||
|
let provider = new UpdateProvider();
|
||||||
|
run_next_test();
|
||||||
|
});
|
||||||
|
|
||||||
|
add_task(function test_init() {
|
||||||
|
let storage = yield Metrics.Storage("init");
|
||||||
|
let provider = new UpdateProvider();
|
||||||
|
yield provider.init(storage);
|
||||||
|
yield provider.shutdown();
|
||||||
|
|
||||||
|
yield storage.close();
|
||||||
|
});
|
||||||
|
|
||||||
|
add_task(function test_collect() {
|
||||||
|
let storage = yield Metrics.Storage("collect");
|
||||||
|
let provider = new UpdateProvider();
|
||||||
|
yield provider.init(storage);
|
||||||
|
|
||||||
|
let now = new Date();
|
||||||
|
|
||||||
|
let m = provider.getMeasurement("update", 1);
|
||||||
|
|
||||||
|
let fieldcount = 0;
|
||||||
|
for (let field of ["updateCheckStart",
|
||||||
|
"updateCheckSuccess",
|
||||||
|
"completeUpdateStart",
|
||||||
|
"partialUpdateStart",
|
||||||
|
"completeUpdateSuccess",
|
||||||
|
"partialUpdateSuccess"]) {
|
||||||
|
fieldcount++; // One new day per iteration
|
||||||
|
|
||||||
|
yield provider.recordUpdate(field, 0);
|
||||||
|
|
||||||
|
let data = yield m.getValues();
|
||||||
|
do_check_eq(data.days.size, 1);
|
||||||
|
|
||||||
|
let day = data.days.getDay(now);
|
||||||
|
do_check_eq(day.size, fieldcount);
|
||||||
|
do_check_eq(day.get(field + "Count"), 1);
|
||||||
|
|
||||||
|
yield provider.recordUpdate(field, 0);
|
||||||
|
|
||||||
|
data = yield m.getValues();
|
||||||
|
day = data.days.getDay(now);
|
||||||
|
do_check_eq(day.size, fieldcount);
|
||||||
|
do_check_eq(day.get(field + "Count"), 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let field of ["updateCheckFailed", "updateFailed"]) {
|
||||||
|
fieldcount += 2; // Two fields added per iteration
|
||||||
|
|
||||||
|
yield provider.recordUpdate(field, 500);
|
||||||
|
|
||||||
|
let data = yield m.getValues();
|
||||||
|
let day = data.days.getDay(now);
|
||||||
|
do_check_eq(day.size, fieldcount);
|
||||||
|
|
||||||
|
do_check_eq(day.get(field + "Statuses"), 500);
|
||||||
|
|
||||||
|
yield provider.recordUpdate(field, 800);
|
||||||
|
|
||||||
|
data = yield m.getValues();
|
||||||
|
day = data.days.getDay(now);
|
||||||
|
do_check_eq(day.size, fieldcount);
|
||||||
|
do_check_eq(day.get(field + "Statuses")[0], 500);
|
||||||
|
do_check_eq(day.get(field + "Statuses")[1], 800);
|
||||||
|
}
|
||||||
|
|
||||||
|
yield provider.shutdown();
|
||||||
|
yield storage.close();
|
||||||
|
});
|
||||||
|
|
@ -39,3 +39,5 @@ skip-if = toolkit == 'gonk'
|
|||||||
reason = custom nsIUpdatePrompt
|
reason = custom nsIUpdatePrompt
|
||||||
[updateRootDirMigration_win.js]
|
[updateRootDirMigration_win.js]
|
||||||
run-if = os == 'win'
|
run-if = os == 'win'
|
||||||
|
[updateHealthReport.js]
|
||||||
|
skip-if = ! healthreport
|
||||||
|
@ -2481,18 +2481,12 @@ GetDPI(NSWindow* aWindow)
|
|||||||
[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] intValue];
|
[[[screen deviceDescription] objectForKey:@"NSScreenNumber"] intValue];
|
||||||
CGFloat heightMM = ::CGDisplayScreenSize(displayID).height;
|
CGFloat heightMM = ::CGDisplayScreenSize(displayID).height;
|
||||||
size_t heightPx = ::CGDisplayPixelsHigh(displayID);
|
size_t heightPx = ::CGDisplayPixelsHigh(displayID);
|
||||||
CGFloat scaleFactor = [aWindow userSpaceScaleFactor];
|
if (heightMM < 1 || heightPx < 1) {
|
||||||
if (scaleFactor < 0.01 || heightMM < 1 || heightPx < 1) {
|
|
||||||
// Something extremely bogus is going on
|
// Something extremely bogus is going on
|
||||||
return 96.0f;
|
return 96.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Currently we don't do our own scaling to take account
|
float dpi = heightPx / (heightMM / MM_PER_INCH_FLOAT);
|
||||||
// of userSpaceScaleFactor, so every "pixel" we draw is actually
|
|
||||||
// userSpaceScaleFactor screen pixels. So divide the screen height
|
|
||||||
// by userSpaceScaleFactor to get the number of "device pixels"
|
|
||||||
// available.
|
|
||||||
float dpi = (heightPx / scaleFactor) / (heightMM / MM_PER_INCH_FLOAT);
|
|
||||||
|
|
||||||
// Account for HiDPI mode where Cocoa's "points" do not correspond to real
|
// Account for HiDPI mode where Cocoa's "points" do not correspond to real
|
||||||
// device pixels
|
// device pixels
|
||||||
|
@ -3232,6 +3232,18 @@ nsNativeThemeCocoa::WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
|
|||||||
aAttribute == nsGkAtoms::open ||
|
aAttribute == nsGkAtoms::open ||
|
||||||
aAttribute == nsGkAtoms::hover)
|
aAttribute == nsGkAtoms::hover)
|
||||||
*aShouldRepaint = true;
|
*aShouldRepaint = true;
|
||||||
|
|
||||||
|
if ((aWidgetType == NS_THEME_SCROLLBAR ||
|
||||||
|
aWidgetType == NS_THEME_SCROLLBAR_SMALL) &&
|
||||||
|
!nsLookAndFeel::UseOverlayScrollbars() &&
|
||||||
|
(aAttribute == nsGkAtoms::curpos ||
|
||||||
|
aAttribute == nsGkAtoms::minpos ||
|
||||||
|
aAttribute == nsGkAtoms::maxpos ||
|
||||||
|
aAttribute == nsGkAtoms::pageincrement)) {
|
||||||
|
// Non-overlay scrollbars paint the thumb as part of the scrollbar,
|
||||||
|
// so we need to invalidate the scrollbar when the thumb moves.
|
||||||
|
*aShouldRepaint = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -3589,6 +3589,15 @@ nsWindow::UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t
|
||||||
|
nsWindow::GetMaxTouchPoints() const
|
||||||
|
{
|
||||||
|
if (IsWin7OrLater()) {
|
||||||
|
return GetSystemMetrics(SM_MAXIMUMTOUCHES);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
**************************************************************
|
**************************************************************
|
||||||
**
|
**
|
||||||
|
@ -197,6 +197,7 @@ public:
|
|||||||
virtual void EndRemoteDrawing() MOZ_OVERRIDE;
|
virtual void EndRemoteDrawing() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) MOZ_OVERRIDE;
|
virtual void UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries) MOZ_OVERRIDE;
|
||||||
|
virtual uint32_t GetMaxTouchPoints() const MOZ_OVERRIDE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event helpers
|
* Event helpers
|
||||||
|
@ -45,6 +45,11 @@
|
|||||||
#define SM_CXPADDEDBORDER 92
|
#define SM_CXPADDEDBORDER 92
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// require WINVER >= 0x601
|
||||||
|
#ifndef SM_MAXIMUMTOUCHES
|
||||||
|
#define SM_MAXIMUMTOUCHES 95
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef WM_THEMECHANGED
|
#ifndef WM_THEMECHANGED
|
||||||
#define WM_THEMECHANGED 0x031A
|
#define WM_THEMECHANGED 0x031A
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user