Bug 1258535 - Check for the existence of a global before checking if its standard classes are resolved; r=jandem
authorNick Fitzgerald <fitzgen@gmail.com>
Thu, 07 Apr 2016 14:15:42 -0700
changeset 292272 029c36687f2fb6d6568ced20042b22933f026561
parent 292271 3481f843cf295851830f6830527b47e7e976bac8
child 292273 0df02c629e779e0c26125664605b36f1f5fdee30
push id30154
push usercbook@mozilla.com
push dateFri, 08 Apr 2016 10:00:50 +0000
treeherdermozilla-central@d9b1a9829c8e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1258535
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1258535 - Check for the existence of a global before checking if its standard classes are resolved; r=jandem MozReview-Commit-ID: K2YgqJvwF7j
js/src/vm/SavedStacks.cpp
--- a/js/src/vm/SavedStacks.cpp
+++ b/js/src/vm/SavedStacks.cpp
@@ -1064,16 +1064,17 @@ bool
 SavedStacks::saveCurrentStack(JSContext* cx, MutableHandleSavedFrame frame, unsigned maxFrameCount)
 {
     MOZ_ASSERT(initialized());
     MOZ_RELEASE_ASSERT(cx->compartment());
     assertSameCompartment(cx, this);
 
     if (creatingSavedFrame ||
         cx->isExceptionPending() ||
+        !cx->global() ||
         !cx->global()->isStandardClassResolved(JSProto_Object))
     {
         frame.set(nullptr);
         return true;
     }
 
     AutoSPSEntry psuedoFrame(cx->runtime(), "js::SavedStacks::saveCurrentStack");
     FrameIter iter(cx, FrameIter::ALL_CONTEXTS, FrameIter::GO_THROUGH_SAVED);