Closed xiaoyinl closed 7 years ago
@xiaoyinl, Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request. Thanks, Microsoft Pull Request Bot
@liminzhu Does this require updating the doc comments in the source code as well?
@liminzhu I just realized I actually updated JsCopyStringUtf16 (instead of JsCreateStringUtf16) and JsCreateString. Do JsCopyString and JsCopyStringUtf16 also require active script context? If so, I will update this patch to update all four APIs.
No copystring actually does not require script context.
@dilijev @liminzhu I updated the remarks in the header too.
I force pushed a new commit. Now it only updates two JsCreateString APIs.
It seems to me that
JsCreateString
andJsCreateStringUtf16
require an active script context. They both returnJsErrorNoCurrentContext
ifJsSetCurrentContext
is not called earlier. But the doc doesn't mention they "require an active script context" in the "Remarks" section. I wonder if this note should be added.The following is the test code: