diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-08-15 20:12:03 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-08 10:14:22 +0100 |
commit | ea1e3dae3279f6f57e18c951e3b309d2d0ab4747 (patch) | |
tree | 457debe0b64e67fd2ac05498fb8efe02bbce979d /js/src/vm/Stack.cpp | |
parent | 35d637ad9d57733a127d62a9c422e1f536ae7452 (diff) | |
download | aura-central-ea1e3dae3279f6f57e18c951e3b309d2d0ab4747.tar.gz |
Add rematerialized frames to the table on JitActivation after rematerialization succeeds.
Diffstat (limited to 'js/src/vm/Stack.cpp')
-rw-r--r-- | js/src/vm/Stack.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/js/src/vm/Stack.cpp b/js/src/vm/Stack.cpp index 7978d8dbc..439bb1ed4 100644 --- a/js/src/vm/Stack.cpp +++ b/js/src/vm/Stack.cpp @@ -1517,11 +1517,7 @@ jit::JitActivation::getRematerializedFrame(JSContext* cx, const JitFrameIterator uint8_t* top = iter.fp(); RematerializedFrameTable::AddPtr p = rematerializedFrames_->lookupForAdd(top); if (!p) { - RematerializedFrameVector empty(cx); - if (!rematerializedFrames_->add(p, top, Move(empty))) { - ReportOutOfMemory(cx); - return nullptr; - } + RematerializedFrameVector frames(cx); // The unit of rematerialization is an uninlined frame and its inlined // frames. Since inlined frames do not exist outside of snapshots, it @@ -1536,9 +1532,11 @@ jit::JitActivation::getRematerializedFrame(JSContext* cx, const JitFrameIterator // be in the activation's compartment. AutoCompartment ac(cx, compartment_); - if (!RematerializedFrame::RematerializeInlineFrames(cx, top, inlineIter, recover, - p->value())) - { + if (!RematerializedFrame::RematerializeInlineFrames(cx, top, inlineIter, recover, frames)) + return nullptr; + + if (!rematerializedFrames_->add(p, top, Move(frames))) { + ReportOutOfMemory(cx); return nullptr; } |