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-29 18:44:05 -06:00
parent 775e6097f5
commit 48e6819e77

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.