Bug 1013658 - Handle null ScriptSource in AutoFilename::get (r=bholley)

--HG--
extra : rebase_source : d154d1c974c8ec69744773c14d57c278e75a77f5
This commit is contained in:
Luke Wagner 2014-05-20 21:12:23 -05:00
parent 354e7e9196
commit cc9ad721c6

View File

@ -6382,8 +6382,7 @@ AutoFilename::reset(void *newScriptSource)
const char *
AutoFilename::get() const
{
JS_ASSERT(scriptSource_);
return reinterpret_cast<ScriptSource*>(scriptSource_)->filename();
return scriptSource_ ? reinterpret_cast<ScriptSource*>(scriptSource_)->filename() : nullptr;
}
JS_PUBLIC_API(bool)