Bug 1050000 - check "result" against undefined before use. r=past

This commit is contained in:
Tom Tromey 2014-10-15 09:11:00 +02:00
parent ea01a57268
commit 63cc1ebee3

View File

@ -1177,10 +1177,10 @@ let DebuggerEnvironmentSupport = {
// TODO: we should use getVariableDescriptor() here - bug 725815.
let result = aObj.getVariable(aName);
// FIXME: Need actual UI, bug 941287.
if (result.optimizedOut || result.missingArguments) {
if (result === undefined || result.optimizedOut || result.missingArguments) {
return null;
}
return result === undefined ? null : { value: result };
return { value: result };
},
};