import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1176288 - Part 4: Fix octane regression, r=bbouvier (3ae04863c9)
- Bug 1199417- Scale skia paths up before hit testing to workaround coordinate resolution limits. r=mattwoodrow (b3ec1288e8)
- Bug 1117338 - Blow up if we can't convert a cairo format to a gfx one r=milan (be268bf93a)
- Bug 1161642 - Cross compilation fixup. (58da4778e4)
- Bug 1190705 - Ensure that canvas 2d matrix transforms are finite. r=Bas, r=jrmuizel (ec3a6a510e)
- Bug 1204824. Make Matrix4x4::PreScale scale all values in the first three rows. r=bas (457cc10f80)
- namespace (a341cb46be)
- Bug 1162726 - Make RoundedToInt() snap the rect properly. r=roc (7fd0a19105)
- Bug 1178965 - Check if Factory::GetD2D1Device fails in SourceSurfaceD2D1. r=nical (cad95d7703)
- Bug 1163735 - Ensure that we don't hand out a destroyed TabChild from WorkerPrivate::InterfaceRequestor (r=khuey) (270cf6ae33)
- Bug 1198451 - Disambiguate mozilla::dom::Function from mozilla::Function. r=froydnj (d08622cbd4)- reorder (eea96d09ee)
- reorder (eea96d09ee)
- Bug 1147990 - websocket test suite - patch 2 - webSocket.url should be the spec of nsIURI, r=smaug (a983655514)
- Bug 1147990 - websocket test suite - patch 1 - URL with #ref should not be accepted, r=smaug (7af5e9528d)
- Bug 1147990 - websocket test suite - patch 3 - Not all the ports are accepted, r=smaug (a34d69e29b)
- Bug 1147990 - websocket test suite - patch 4 - web-platform-test suite fixed, a=tomcat CLOSED TREE (f2966f52d0)
- Bug 1147990 - websocket test suite - patch 5 - web-platform-test suite - js error fixed, r=jgraham (1b52d4853e)
This commit is contained in:
2022-03-15 08:55:46 +08:00
parent 38ceaed34c
commit 0ca97f19ba
24 changed files with 129 additions and 109 deletions
+11 -12
View File
@@ -610,10 +610,6 @@ WebSocketImpl::Disconnect()
AssertIsOnTargetThread();
// DontKeepAliveAnyMore() can release the object. So hold a reference to this
// until the end of the method.
nsRefPtr<WebSocketImpl> kungfuDeathGrip = this;
// Disconnect can be called from some control event (such as Notify() of
// WorkerFeature). This will be schedulated before any other sync/async
// runnable. In order to prevent some double Disconnect() calls, we use this
@@ -631,6 +627,10 @@ WebSocketImpl::Disconnect()
runnable->Dispatch(mWorkerPrivate->GetJSContext());
}
// DontKeepAliveAnyMore() can release the object. So hold a reference to this
// until the end of the method.
nsRefPtr<WebSocketImpl> kungfuDeathGrip = this;
nsCOMPtr<nsIThread> mainThread;
if (NS_FAILED(NS_GetMainThread(getter_AddRefs(mainThread))) ||
NS_FAILED(NS_ProxyRelease(mainThread, mChannel))) {
@@ -1888,9 +1888,9 @@ WebSocketImpl::ParseURL(const nsAString& aURL)
nsCOMPtr<nsIURL> parsedURL = do_QueryInterface(uri, &rv);
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
nsAutoCString fragment;
rv = parsedURL->GetRef(fragment);
NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && fragment.IsEmpty(),
bool hasRef;
rv = parsedURL->GetHasRef(&hasRef);
NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && !hasRef,
NS_ERROR_DOM_SYNTAX_ERR);
nsAutoCString scheme;
@@ -1907,7 +1907,7 @@ WebSocketImpl::ParseURL(const nsAString& aURL)
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
rv = NS_CheckPortSafety(port, scheme.get());
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SYNTAX_ERR);
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SECURITY_ERR);
nsAutoCString filePath;
rv = parsedURL->GetFilePath(filePath);
@@ -1950,11 +1950,10 @@ WebSocketImpl::ParseURL(const nsAString& aURL)
}
}
mWebSocket->mOriginalURL = aURL;
rv = parsedURL->GetSpec(mURI);
MOZ_ASSERT(NS_SUCCEEDED(rv));
CopyUTF8toUTF16(mURI, mWebSocket->mURI);
return NS_OK;
}
@@ -2213,7 +2212,7 @@ WebSocket::GetUrl(nsAString& aURL)
AssertIsOnTargetThread();
if (mEffectiveURL.IsEmpty()) {
aURL = mOriginalURL;
aURL = mURI;
} else {
aURL = mEffectiveURL;
}
@@ -2444,7 +2443,7 @@ WebSocketImpl::GetName(nsACString& aName)
{
AssertIsOnMainThread();
CopyUTF16toUTF8(mWebSocket->mOriginalURL, aName);
CopyUTF16toUTF8(mWebSocket->mURI, aName);
return NS_OK;
}