mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1412190 - Allow active context to be null during profiling (r=jandem)
MozReview-Commit-ID: 3bLcXBPpxtY
This commit is contained in:
parent
51c04f774f
commit
5d1bba8be6
@ -441,7 +441,7 @@ ProfileEntry::script() const
|
||||
// AutoSuppressProfilerSampling prohibits the runtime's active context from
|
||||
// being changed while it exists.
|
||||
JSContext* cx = script->runtimeFromAnyThread()->activeContext();
|
||||
if (!cx->isProfilerSamplingEnabled())
|
||||
if (!cx || !cx->isProfilerSamplingEnabled())
|
||||
return nullptr;
|
||||
|
||||
MOZ_ASSERT(!IsForwarded(script));
|
||||
|
Loading…
Reference in New Issue
Block a user