URL: https://bug1306591.bmoattachments.org/attachment.cgi?id=8803164
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-selector_01.js b/devtools/client/inspector/test/browser_inspector_highlighter-selector_01.js
--- a/devtools/client/inspector/test/browser_inspector_highlighter-selector_01.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-selector_01.js
@@ -32,16 +32,18 @@ const TEST_DATA = [{
}, {
selector: ".item",
containerCount: 5
}, {
selector: "#test-node, ul, .item",
containerCount: 7
}];
+requestLongerTimeout(5);
+
add_task(function* () {
let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
let front = inspector.inspector;
let highlighter = yield front.getHighlighterByType("SelectorHighlighter");
let contextNode = yield getNodeFront("body", inspector);
for (let {selector, containerCount} of TEST_DATA) {
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-selector_02.js b/devtools/client/inspector/test/browser_inspector_highlighter-selector_02.js
--- a/devtools/client/inspector/test/browser_inspector_highlighter-selector_02.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-selector_02.js
@@ -25,16 +25,18 @@ const TEST_DATA = [{
selector: ".root-level-node",
containerCount: 0
}, {
inIframe: true,
selector: ".sub-level-node",
containerCount: 1
}];
+requestLongerTimeout(5);
+
add_task(function* () {
let {inspector, testActor} = yield openInspectorForURL(TEST_URL);
let front = inspector.inspector;
let highlighter = yield front.getHighlighterByType("SelectorHighlighter");
for (let {inIframe, selector, containerCount} of TEST_DATA) {
info("Showing the highlighter on " + selector + ". Expecting " +
containerCount + " highlighter containers");
diff --git a/dom/svg/test/test_pathAnimInterpolation.xhtml b/dom/svg/test/test_pathAnimInterpolation.xhtml
--- a/dom/svg/test/test_pathAnimInterpolation.xhtml
+++ b/dom/svg/test/test_pathAnimInterpolation.xhtml
@@ -330,15 +330,19 @@ function run()
}
is(seg.pathSegTypeAsLetter + actual, test.expectedType + test.expected,
"Path segment for interpolation " +
(test.usesAddition ? "with addition " : "") +
" from " + test.from + " to " + test.to);
}
+ // Clear all the tests. We have tons of them attached to the DOM and refresh driver tick will
+ // go through them all by calling animation controller.
+ gSVG.remove();
+
SimpleTest.finish();
}
window.addEventListener("load", run, false);
]]>
diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -514,16 +514,19 @@ MessageChannel::MessageChannel(MessageLi
runnable = NewNonOwningCancelableRunnableMethod(this, &MessageChannel::DispatchOnChannelConnected);
mOnChannelConnectedTask = new RefCountedTask(runnable.forget());
#ifdef OS_WIN
mEvent = CreateEventW(nullptr, TRUE, FALSE, nullptr);
MOZ_RELEASE_ASSERT(mEvent, "CreateEvent failed! Nothing is going to work!");
#endif
+ for (int i = 0; i < IPC::Message::HIGH_PRIORITY; i++) {
+ mPriorityCount[i] = 0;
+ }
}
MessageChannel::~MessageChannel()
{
MOZ_COUNT_DTOR(ipc::MessageChannel);
IPC_ASSERT(mCxxStackFrames.empty(), "mismatched CxxStackFrame ctor/dtors");
#ifdef OS_WIN
if (mEvent) {
@@ -645,16 +648,19 @@ MessageChannel::Clear()
if (mChannelErrorTask) {
mChannelErrorTask->Cancel();
mChannelErrorTask = nullptr;
}
// Free up any memory used by pending messages.
mPending.clear();
+ for (int i = 0; i < IPC::Message::HIGH_PRIORITY; i++) {
+ mPriorityCount[i] = 0;
+ }
mOutOfTurnReplies.clear();
while (!mDeferred.empty()) {
mDeferred.pop();
}
}
bool
MessageChannel::Open(Transport* aTransport, MessageLoop* aIOLoop, Side aSide)
@@ -931,29 +937,31 @@ MessageChannel::OnMessageReceivedFromLin
mPending.back().type() == aMsg.type() &&
mPending.back().routing_id() == aMsg.routing_id());
if (compress) {
// This message type has compression enabled, and the back of the
// queue was the same message type and routed to the same destination.
// Replace it with the newer message.
MOZ_RELEASE_ASSERT(mPending.back().compress_type() ==
IPC::Message::COMPRESSION_ENABLED);
+ mPriorityCount[mPending.back().priority()]--;
mPending.pop_back();
}
} else if (aMsg.compress_type() == IPC::Message::COMPRESSION_ALL) {
// Check the message queue for another message with this type/destination.
auto it = std::find_if(mPending.rbegin(), mPending.rend(),
MatchingKinds(aMsg.type(), aMsg.routing_id()));
if (it != mPending.rend()) {
// This message type has compression enabled, and the queue holds
// a message with the same message type and routed to the same destination.
// Erase it. Note that, since we always compress these redundancies, There Can
// Be Only One.
compress = true;
MOZ_RELEASE_ASSERT((*it).compress_type() == IPC::Message::COMPRESSION_ALL);
+ mPriorityCount[(*it).priority()]--;
mPending.erase((++it).base());
}
}
bool wakeUpSyncSend = AwaitingSyncReply() && !ShouldDeferMessage(aMsg);
bool shouldWakeUp = AwaitingInterruptReply() ||
wakeUpSyncSend ||
@@ -985,27 +993,30 @@ MessageChannel::OnMessageReceivedFromLin
//
// (3) We are not waiting on a reply.
// - We post a task to the main event loop.
//
// Note that, we may notify the main thread even though the monitor is not
// blocked. This is okay, since we always check for pending events before
// blocking again.
+ int msgPrio = aMsg.priority();
+ mPriorityCount[msgPrio]++;
mPending.push_back(Move(aMsg));
if (shouldWakeUp) {
NotifyWorkerThread();
}
if (shouldPostTask) {
if (!compress) {
// If we compressed away the previous message, we'll re-use
// its pending task.
- RefPtr