Bug 1190921 - Broadcastchannel keeps its containing iframe in memory when it has a user defined property, r=khuey

--HG--
extra : rebase_source : 233d08a93763a93eb1393b20c26da965efb6a07a
This commit is contained in:
Olli Pettay 2015-08-06 01:26:00 +03:00
parent cb37e46dd2
commit 8ebd3b10ac
2 changed files with 5 additions and 4 deletions

View File

@ -654,10 +654,6 @@ BroadcastChannel::Observe(nsISupports* aSubject, const char* aTopic,
// If the window is destroyed we have to release the reference that we are
// keeping.
if (!mIsKeptAlive) {
return NS_OK;
}
nsCOMPtr<nsISupportsPRUint64> wrapper = do_QueryInterface(aSubject);
NS_ENSURE_TRUE(wrapper, NS_ERROR_FAILURE);

View File

@ -52,6 +52,11 @@ function runTest() {
function iframeLoaded() {
bc.postMessage("Hello world from the window!");
}
// A leak test
var dummyBc = new BroadcastChannel("dont_leak_this");
dummyBc.foo = "bar";
// don't add message listener!
}
SimpleTest.waitForExplicitFinish();