-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix for JsPointerToString and JsCreateString #6669 #6737
Changes from 1 commit
4ee3b22
8a1bda6
50f05ff
dfe6d16
d7cef72
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 |
---|---|---|
|
@@ -868,10 +868,15 @@ static void CastCopy(const SrcChar* src, DstChar* dst, size_t count) | |
} | ||
|
||
CHAKRA_API JsCreateString( | ||
_In_ const char *content, | ||
_In_opt_ const char *content, | ||
_In_ size_t length, | ||
_Out_ JsValueRef *value) | ||
{ | ||
if (length == 0) | ||
{ | ||
content = ""; | ||
} | ||
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. Please could you bring this in line with the way you've done JsPointerToString below? If length = 0, skip the 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. Oh, I see. I had issues with GetEmptyString() because I was including line 898. Executing 896 and 898 only when length isn't zero fixed this. Thank you. |
||
|
||
PARAM_NOT_NULL(content); | ||
PARAM_NOT_NULL(value); | ||
*value = JS_INVALID_REFERENCE; | ||
|
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.
Please could you use spaces instead of tabs for the indent (here and other files) - our code base uses spaces consistently.