Bug 1235989 - Add a null check for filename in ModuleValidator::finish. r=luke

This commit is contained in:
Benjamin Bouvier 2015-12-31 12:17:03 +01:00
parent 031d66b209
commit 094cd16549
2 changed files with 6 additions and 5 deletions

View File

@ -2034,9 +2034,12 @@ class MOZ_STACK_CLASS ModuleValidator
auto mutedErrors = Module::MutedBool(parser_.ss->mutedErrors());
CacheableChars filename = make_string_copy(parser_.ss->filename());
if (!filename)
return false;
CacheableChars filename;
if (parser_.ss->filename()) {
filename = make_string_copy(parser_.ss->filename());
if (!filename)
return false;
}
CacheableTwoByteChars displayURL;
if (parser_.ss->hasDisplayURL()) {
@ -6738,7 +6741,6 @@ CheckSwitch(FunctionValidator& f, ParseNode* switchStmt)
if (!CheckStatement(f, CaseBody(stmt)))
return false;
}
bool hasDefault = false;

View File

@ -3075,7 +3075,6 @@ wasm::IonCompileFunction(IonCompileTask* task)
// Compile MIR graph
{
jit::SpewBeginFunction(&mir, nullptr);
jit::AutoSpewEndFunction spewEndFunction(&mir);