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 910478ed06
commit 41996aa938

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 };
},
};