Skip to content
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

Fixes for step-back with async #4796

Merged
merged 1 commit into from
Mar 12, 2018

Conversation

mrkmarron
Copy link
Contributor

Add missing snapshot visit location.
Fix previous line logic for inline awaits.

Copy link
Contributor

@mike-kaufman mike-kaufman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -896,7 +896,8 @@ namespace TTD
//we moved to a new statement
Js::FunctionBody::StatementMap* pstmt = fb->GetStatementMaps()->Item(cIndex);
bool newstmt = (cIndex != cfinfo.CurrentStatementIndex && pstmt->byteCodeSpan.begin <= (int)bytecodeOffset && (int)bytecodeOffset <= pstmt->byteCodeSpan.end);
if (newstmt)
bool startUnaligned = (cfinfo.CurrentStatementIndex == -1) && (pstmt->byteCodeSpan.begin != (int)bytecodeOffset); //make sure async step back is ok
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I mildly prefer testing against the positive case rather than testing the inverse of the negative case (i.e have a variable called startAligned instead).

What is expected to happen if the statement is not aligned?

I'm also unclear as to the circumstances when pstmt->byteCodeSpan.begin != byteCodeOffset- I can believe it happens but I'm not sure why it's related to async calls- can you add a clarifying comment here that speaks to that?

@digitalinfinity
Copy link
Contributor

    if((cfinfo.CurrentStatementBytecodeMin <= bytecodeOffset) & (bytecodeOffset <= cfinfo.CurrentStatementBytecodeMax))

Nit: not your current change but since you're touching this file anyway- should this be &&?


Refers to: lib/Runtime/Debug/TTExecutionInfo.cpp:883 in 5784b7b. [](commit_id = 5784b7b, deletion_comment = False)

Copy link
Contributor

@digitalinfinity digitalinfinity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@chakrabot chakrabot merged commit 113b040 into chakra-core:release/1.9 Mar 12, 2018
chakrabot pushed a commit that referenced this pull request Mar 12, 2018
Merge pull request #4796 from mrkmarron:asyncfixes19

Add missing snapshot visit location.
Fix previous line logic for inline awaits.
chakrabot pushed a commit that referenced this pull request Mar 12, 2018
Merge pull request #4796 from mrkmarron:asyncfixes19

Add missing snapshot visit location.
Fix previous line logic for inline awaits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants