-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Minor false positive fixes in ChakraCore #1581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,31 @@ namespace Js | |
| Assert(allocator.AllocatedSize() == 0); | ||
| } | ||
|
|
||
| template <bool isGuestArena> | ||
| void TempArenaAllocatorWrapper<isGuestArena>::AdviseInUse() | ||
| { | ||
| if (isGuestArena) | ||
| { | ||
| if (externalGuestArenaRef == nullptr) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we assert that externalGuestArenaRef != nullptr in
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we assert that externalGuestArenaRef != nullptr in AdviseNotInUse, should this be an assert externalGuestArenaRef == nullptr too? |
||
| { | ||
| externalGuestArenaRef = this->recycler->RegisterExternalGuestArena(this->GetAllocator()); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| template <bool isGuestArena> | ||
| void TempArenaAllocatorWrapper<isGuestArena>::AdviseNotInUse() | ||
| { | ||
| this->allocator.Reset(); | ||
|
|
||
| if (isGuestArena) | ||
| { | ||
| Assert(externalGuestArenaRef != nullptr); | ||
| this->recycler->UnregisterExternalGuestArena(externalGuestArenaRef); | ||
| externalGuestArenaRef = nullptr; | ||
| } | ||
| } | ||
|
|
||
| // Explicit instantiation | ||
| template class TempArenaAllocatorWrapper<true>; | ||
| template class TempArenaAllocatorWrapper<false>; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,8 @@ namespace Js | |
|
|
||
| public: | ||
|
|
||
| void AdviseInUse(); | ||
| void AdviseNotInUse(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Were the implementations of these already present?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No? Newly added
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Derp; I didn't see them above |
||
|
|
||
| static TempArenaAllocatorWrapper* Create(ThreadContext * threadContext); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@digitalinfinity Strange, why CI did not complain on this? Should use DECLSPEC_GUARD_OVERFLOW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derp- I don't know? @dilijev any ideas? @jainchun, i'll make the change- sorry, had ported the change from Threshold and didn't notice the macro conversion 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JIT is still disabled on Linux so this whole block is probably compiled out on Linux