Bug 1204725 - IonMonkey: Check result when copying frame iter data, r=nbp
authorHannes Verschore <hv1989@gmail.com>
Thu, 17 Sep 2015 09:21:42 +0200
changeset 295606 f9f33ed1f4da7715d47242ba2e561c468c235730
parent 295605 132419105b7daf70daf48234eac1bcdc09ae80b6
child 295607 9efbf9792f34fc2349f077cf58dff4c68baa8fbc
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1204725
milestone43.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 1204725 - IonMonkey: Check result when copying frame iter data, r=nbp
js/src/vm/Stack.cpp
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -747,16 +747,19 @@ FrameIter::operator++()
     }
     return *this;
 }
 
 FrameIter::Data*
 FrameIter::copyData() const
 {
     Data* data = data_.cx_->new_<Data>(data_);
+    if (!data)
+        return nullptr;
+
     MOZ_ASSERT(data_.state_ != ASMJS);
     if (data && data_.jitFrames_.isIonScripted())
         data->ionInlineFrameNo_ = ionInlineFrames_.frameNo();
     // Give the copied Data the cx of the current activation, which may be
     // different than the cx that the current FrameIter was constructed
     // with. This ensures that when we instantiate another FrameIter with the
     // copied data, its cx is still alive.
     data->cx_ = activation()->cx();