mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
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:
parent
cb37e46dd2
commit
8ebd3b10ac
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user