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

This commit is contained in:
Olli Pettay 2015-08-06 01:26:00 +03:00
parent 02919da4b2
commit 63084e619c
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();