Merge mozilla-inbound to mozilla-central. a=merge

This commit is contained in:
Dorel Luca 2019-05-18 13:25:28 +03:00
Родитель 6d86a346d7 2d3ff6b0f5
Коммит 60706fc799
4 изменённых файлов: 36 добавлений и 27 удалений

Просмотреть файл

@ -2966,7 +2966,7 @@ void InitUsageForOrigin(const nsACString& aOrigin, int64_t aUsage) {
gUsages = new UsageHashtable();
}
MOZ_ASSERT(!gUsages->Contains(aOrigin));
MOZ_DIAGNOSTIC_ASSERT(!gUsages->Contains(aOrigin));
gUsages->Put(aOrigin, aUsage);
}

Просмотреть файл

@ -978,8 +978,10 @@ NPError _geturlnotify(NPP aNPP, const char* aRelativeURL, const char* aTarget,
auto* sn = new StreamNotifyChild(url);
NPError err;
InstCast(aNPP)->CallPStreamNotifyConstructor(sn, url, NullableString(aTarget),
false, nsCString(), false, &err);
if (!InstCast(aNPP)->CallPStreamNotifyConstructor(
sn, url, NullableString(aTarget), false, nsCString(), false, &err)) {
return NPERR_GENERIC_ERROR;
}
if (NPERR_NO_ERROR == err) {
// If NPN_PostURLNotify fails, the parent will immediately send us
@ -1081,9 +1083,11 @@ NPError _posturlnotify(NPP aNPP, const char* aRelativeURL, const char* aTarget,
auto* sn = new StreamNotifyChild(url);
NPError err;
InstCast(aNPP)->CallPStreamNotifyConstructor(
sn, url, NullableString(aTarget), true, nsCString(aBuffer, aLength),
aIsFile, &err);
if (!InstCast(aNPP)->CallPStreamNotifyConstructor(
sn, url, NullableString(aTarget), true, nsCString(aBuffer, aLength),
aIsFile, &err)) {
return NPERR_GENERIC_ERROR;
}
if (NPERR_NO_ERROR == err) {
// If NPN_PostURLNotify fails, the parent will immediately send us

Просмотреть файл

@ -4133,20 +4133,38 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
replyvar = self.replyvar
sendok, sendstmts = self.sendBlocking(md, msgvar, replyvar)
failIf = StmtIf(ExprNot(sendok))
failIf.addifstmt(_printWarningMessage('Error sending constructor'))
failIf.addifstmts(self.destroyActor(md, actor.var(),
why=_DestroyReason.FailedConstructor))
failIf.addifstmt(StmtReturn(ExprLiteral.NULL))
method.addstmts(
# Build our constructor message & verify it.
stmts
+ [Whitespace.NL,
StmtDecl(Decl(Type('Message'), replyvar.name))]
+ self.genVerifyMessage(md.decl.type.verify, md.params,
errfnSendCtor, ExprVar('msg__'))
+ sendstmts
+ self.failCtorIf(md, ExprNot(sendok)))
def errfnCleanupCtor(msg):
return self.failCtorIf(md, ExprLiteral.TRUE)
# Synchronously send the constructor message to the other side.
#
# If the MessageChannel is closing, and we haven't been told yet,
# this send may fail. This error is ignored to treat it like a
# message being lost due to the other side shutting down before
# processing it.
#
# NOTE: We also free the actor here.
+ sendstmts
# Warn, destroy the actor and return null if the message failed to
# send.
+ [failIf])
stmts = self.deserializeReply(
md, ExprAddrOf(replyvar), self.side,
errfnCleanupCtor, errfnSentinel(ExprLiteral.NULL))
errfnSendCtor, errfnSentinel(ExprLiteral.NULL))
method.addstmts(stmts + [StmtReturn(actor.var())])
return method
@ -4177,20 +4195,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
_startState(actorproto.hasReentrantDelete))),
]
def failCtorIf(self, md, cond):
actorvar = md.actorDecl().var()
failif = StmtIf(cond)
if self.side == 'child':
# in the child process this should not fail
failif.addifstmt(_fatalError('constructor for actor failed'))
else:
failif.addifstmts(self.destroyActor(md, actorvar,
why=_DestroyReason.FailedConstructor))
failif.addifstmt(StmtReturn(ExprLiteral.NULL))
return [failif]
def genHelperCtor(self, md):
helperdecl = self.makeSendMethodDecl(md)
helperdecl.params = helperdecl.params[1:]
@ -4943,7 +4947,8 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
md.sendMethod(),
params=md.makeCxxParams(paramsems, returnsems=returnsems,
side=self.side, implicit=implicit),
warn_unused=(self.side == 'parent' and returnsems != 'callback'),
warn_unused=((self.side == 'parent' and returnsems != 'callback') or
(md.decl.type.isCtor() and not md.decl.type.isAsync())),
ret=rettype)
if md.decl.type.isCtor():
decl.ret = md.actorDecl().bareType(self.side)

Просмотреть файл

@ -8,7 +8,7 @@ fuzzy-if(webrender&&winWidget,0-27,0-4) == unit-rem-iframe.html unit-rem-ref-ifr
== unit-rem.svg unit-rem-ref.svg
== unit-vh-vw.html unit-vh-vw-ref.html
== unit-vh-vw-zoom.html unit-vh-vw-zoom-ref.html
skip-if(gtkWidget||cocoaWidget) == unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-auto-ref.html
fuzzy(0-1,0-4) == unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-auto-ref.html # fuzzy due to anti-aliasing pixels in scrollbar redendering
# These tests should probably be removed, see bug 1393603.
fails-if(!Android) == unit-vh-vw-overflow-scroll.html unit-vh-vw-overflow-scroll-ref.html