зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1467273 - JitActivation owns the rematerialized frames of the activation. r=anba
This commit is contained in:
Родитель
b8bea43ef3
Коммит
923cdafe51
|
@ -1580,7 +1580,7 @@ jit::JitActivation::JitActivation(JSContext* cx)
|
||||||
packedExitFP_(nullptr),
|
packedExitFP_(nullptr),
|
||||||
encodedWasmExitReason_(0),
|
encodedWasmExitReason_(0),
|
||||||
prevJitActivation_(cx->jitActivation),
|
prevJitActivation_(cx->jitActivation),
|
||||||
rematerializedFrames_(nullptr),
|
rematerializedFrames_(),
|
||||||
ionRecovery_(cx),
|
ionRecovery_(cx),
|
||||||
bailoutData_(nullptr),
|
bailoutData_(nullptr),
|
||||||
lastProfilingFrame_(nullptr),
|
lastProfilingFrame_(nullptr),
|
||||||
|
@ -1607,7 +1607,6 @@ jit::JitActivation::~JitActivation()
|
||||||
MOZ_ASSERT(!isWasmTrapping());
|
MOZ_ASSERT(!isWasmTrapping());
|
||||||
|
|
||||||
clearRematerializedFrames();
|
clearRematerializedFrames();
|
||||||
js_delete(rematerializedFrames_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1656,11 +1655,11 @@ jit::JitActivation::getRematerializedFrame(JSContext* cx, const JSJitFrameIter&
|
||||||
MOZ_ASSERT(iter.isIonScripted());
|
MOZ_ASSERT(iter.isIonScripted());
|
||||||
|
|
||||||
if (!rematerializedFrames_) {
|
if (!rematerializedFrames_) {
|
||||||
rematerializedFrames_ = cx->new_<RematerializedFrameTable>(cx);
|
rematerializedFrames_ = cx->make_unique<RematerializedFrameTable>(cx);
|
||||||
if (!rematerializedFrames_)
|
if (!rematerializedFrames_)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (!rematerializedFrames_->init()) {
|
if (!rematerializedFrames_->init()) {
|
||||||
rematerializedFrames_ = nullptr;
|
rematerializedFrames_.reset();
|
||||||
ReportOutOfMemory(cx);
|
ReportOutOfMemory(cx);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "jit/JSJitFrameIter.h"
|
#include "jit/JSJitFrameIter.h"
|
||||||
#include "js/RootingAPI.h"
|
#include "js/RootingAPI.h"
|
||||||
#include "js/TypeDecls.h"
|
#include "js/TypeDecls.h"
|
||||||
|
#include "js/UniquePtr.h"
|
||||||
#include "vm/ArgumentsObject.h"
|
#include "vm/ArgumentsObject.h"
|
||||||
#include "vm/JSFunction.h"
|
#include "vm/JSFunction.h"
|
||||||
#include "vm/JSScript.h"
|
#include "vm/JSScript.h"
|
||||||
|
@ -1634,7 +1635,7 @@ class JitActivation : public Activation
|
||||||
// This table is lazily initialized by calling getRematerializedFrame.
|
// This table is lazily initialized by calling getRematerializedFrame.
|
||||||
typedef GCVector<RematerializedFrame*> RematerializedFrameVector;
|
typedef GCVector<RematerializedFrame*> RematerializedFrameVector;
|
||||||
typedef HashMap<uint8_t*, RematerializedFrameVector> RematerializedFrameTable;
|
typedef HashMap<uint8_t*, RematerializedFrameVector> RematerializedFrameTable;
|
||||||
RematerializedFrameTable* rematerializedFrames_;
|
js::UniquePtr<RematerializedFrameTable> rematerializedFrames_;
|
||||||
|
|
||||||
// This vector is used to remember the outcome of the evaluation of recover
|
// This vector is used to remember the outcome of the evaluation of recover
|
||||||
// instructions.
|
// instructions.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче