Bug 1058168 - Tolerate a null PerThreadData runtime in runtimeIfOnOwnerThread(), r=luke.

This commit is contained in:
Brian Hackett 2014-08-26 13:49:45 -07:00
parent 7c10863e87
commit 6ace183a93

View File

@ -1598,7 +1598,7 @@ PerThreadData::runtimeFromMainThread()
inline JSRuntime *
PerThreadData::runtimeIfOnOwnerThread()
{
return CurrentThreadCanAccessRuntime(runtime_) ? runtime_ : nullptr;
return (runtime_ && CurrentThreadCanAccessRuntime(runtime_)) ? runtime_ : nullptr;
}
inline bool