Bug 1132713 - Only enable memory actor when both gecko 38+ and memory actor exists, for addon debugger. r=vp

From b208befbd8912652bdd892a1b2bb8d7b4ff4a895 Mon Sep 17 00:00:00 2001
This commit is contained in:
Jordan Santell 2015-02-13 11:58:38 -08:00
parent a63fa7b5ba
commit dd5ac1043e

View File

@ -81,7 +81,11 @@ function memoryActorSupported (target) {
return false;
}
return !!target.getTrait("memoryActorAllocations");
// We need to test that both the root actor has `memoryActorAllocations`,
// which is in Gecko 38+, and also that the target has a memory actor. There
// are scenarios, like addon debugging, where memoryActorAllocations is available,
// but no memory actor (like addon debugging in Gecko 38+)
return !!target.getTrait("memoryActorAllocations") && target.hasActor("memory");
}
exports.memoryActorSupported = Task.async(memoryActorSupported);