зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1444604: Part 6: Add LiveSavedFrameCache::findWithoutInvalidation. r=jorendorff
--HG-- extra : rebase_source : bbe26f26f0ae8e0f30e6505e1614c3ae4a320300 extra : histedit_source : fa29282837885902c7a5413cce34ef71e8b444d3
This commit is contained in:
Родитель
a6797c105e
Коммит
2776d2837b
|
@ -156,6 +156,24 @@ LiveSavedFrameCache::find(JSContext* cx, FramePtr& framePtr, const jsbytecode* p
|
|||
frame.set(frames->back().savedFrame);
|
||||
}
|
||||
|
||||
void
|
||||
LiveSavedFrameCache::findWithoutInvalidation(const FramePtr& framePtr,
|
||||
MutableHandleSavedFrame frame) const
|
||||
{
|
||||
MOZ_ASSERT(initialized());
|
||||
MOZ_ASSERT(framePtr.hasCachedSavedFrame());
|
||||
|
||||
Key key(framePtr);
|
||||
for (auto& entry : (*frames)) {
|
||||
if (entry.key == key) {
|
||||
frame.set(entry.savedFrame);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
frame.set(nullptr);
|
||||
}
|
||||
|
||||
struct SavedFrame::Lookup {
|
||||
Lookup(JSAtom* source, uint32_t line, uint32_t column,
|
||||
JSAtom* functionDisplayName, JSAtom* asyncCause, SavedFrame* parent,
|
||||
|
|
|
@ -1357,6 +1357,11 @@ class LiveSavedFrameCache
|
|||
void find(JSContext* cx, FramePtr& framePtr, const jsbytecode* pc,
|
||||
MutableHandleSavedFrame frame) const;
|
||||
|
||||
// Search the cache for a frame matching |framePtr|, without removing any
|
||||
// entries. Return the matching saved frame, or nullptr if none is found.
|
||||
// This is used for resolving |evalInFramePrev| links.
|
||||
void findWithoutInvalidation(const FramePtr& framePtr, MutableHandleSavedFrame frame) const;
|
||||
|
||||
// Push a cache entry mapping |framePtr| and |pc| to |savedFrame| on the top
|
||||
// of the cache's stack. You must insert entries for frames from oldest to
|
||||
// youngest. They must all be younger than the frame that the |find| method
|
||||
|
|
Загрузка…
Ссылка в новой задаче