Browse Source

JsSetCurrentContext parameter should be _In_opt_ (#5575)

* JsSetCurrentContext parameter should be _In_opt_

* Update JsSetCurrentContext in jsrt.cpp

Co-authored-by: Richard <[email protected]>
Adam Krantz 5 years ago
parent
commit
1ad850bfcd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lib/Jsrt/ChakraCommon.h
  2. 1 1
      lib/Jsrt/Jsrt.cpp

+ 1 - 1
lib/Jsrt/ChakraCommon.h

@@ -1036,7 +1036,7 @@ typedef unsigned short uint16_t;
     /// </returns>
     CHAKRA_API
         JsSetCurrentContext(
-            _In_ JsContextRef context);
+            _In_opt_ JsContextRef context);
 
     /// <summary>
     ///     Gets the script context that the object belongs to.

+ 1 - 1
lib/Jsrt/Jsrt.cpp

@@ -799,7 +799,7 @@ CHAKRA_API JsGetCurrentContext(_Out_ JsContextRef *currentContext)
     END_JSRT_NO_EXCEPTION
 }
 
-CHAKRA_API JsSetCurrentContext(_In_ JsContextRef newContext)
+CHAKRA_API JsSetCurrentContext(_In_opt_ JsContextRef newContext)
 {
     VALIDATE_ENTER_CURRENT_THREAD();