Skip to content

Commit 6b1731f

Browse files
committed
Addressing code review comments
1 parent 1113bfe commit 6b1731f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Runtime/Library/JavascriptExceptionMetadata.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ namespace Js {
9595

9696
LPCUTF8 functionSource = sourceInfo->GetSource(_u("Jsrt::JsExperimentalGetAndClearExceptionWithMetadata"));
9797

98-
charcount_t startByteOffset;
99-
charcount_t endByteOffset;
100-
charcount_t startCharOffset;
101-
charcount_t endCharOffset;
98+
charcount_t startByteOffset = 0;
99+
charcount_t endByteOffset = 0;
100+
charcount_t startCharOffset = 0;
101+
charcount_t endCharOffset = 0;
102102

103103

104104
startCharOffset = cache->GetCharacterOffsetForLine(line, &startByteOffset);
@@ -143,7 +143,7 @@ namespace Js {
143143
}
144144
else
145145
{
146-
// This should not be possible
146+
AssertMsg(FALSE, "Line ending logic out of sync between Js::JavascriptExceptionMetadata and JsUtil::LineOffsetCache::GetCharacterOffsetForLine");
147147
return false;
148148
}
149149
}

0 commit comments

Comments
 (0)