Bug 865745 - Use a SafeJSContext in TabChildParent. r=smaug

This is just used for rooting, but happens to be a consumer of
nsFrameMessageManager::GetJSContext, which we're about to remove.
This commit is contained in:
Bobby Holley 2013-06-30 09:00:19 -06:00
parent 9a64b0af07
commit 01b83c2693

View File

@ -1091,7 +1091,7 @@ TabParent::ReceiveMessage(const nsString& aMessage,
if (frameLoader && frameLoader->GetFrameMessageManager()) {
nsRefPtr<nsFrameMessageManager> manager =
frameLoader->GetFrameMessageManager();
AutoPushJSContext ctx(manager->GetJSContext());
AutoSafeJSContext ctx;
uint32_t len = 0; //TODO: obtain a real value in bug 572685
// Because we want JS messages to have always the same properties,
// create array even if len == 0.