Update API docs with information on which run loop the VM will use
https://bugs.webkit.org/show_bug.cgi?id=184900
<rdar://problem/39166054>

Reviewed by Mark Lam.

* API/JSContextRef.h:
* API/JSVirtualMachine.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@230961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/API/JSContextRef.h b/Source/JavaScriptCore/API/JSContextRef.h
index 0c800bc..e15cae5 100644
--- a/Source/JavaScriptCore/API/JSContextRef.h
+++ b/Source/JavaScriptCore/API/JSContextRef.h
@@ -46,6 +46,11 @@
  JavaScript objects between contexts in different groups will produce undefined behavior.
  When objects from the same context group are used in multiple threads, explicit
  synchronization is required.
+
+ A JSContextGroup may need to run deferred tasks on a run loop, such as garbage collection
+ or resolving WebAssembly compilations. By default, calling JSContextGroupCreate will use
+ the run loop of the thread it was called on. Currently, there is no API to change a
+ JSContextGroup's run loop once it has been created.
 @result The created JSContextGroup.
 */
 JS_EXPORT JSContextGroupRef JSContextGroupCreate(void) CF_AVAILABLE(10_6, 7_0);
diff --git a/Source/JavaScriptCore/API/JSVirtualMachine.h b/Source/JavaScriptCore/API/JSVirtualMachine.h
index ccf9264..e9c75da 100644
--- a/Source/JavaScriptCore/API/JSVirtualMachine.h
+++ b/Source/JavaScriptCore/API/JSVirtualMachine.h
@@ -33,6 +33,11 @@
  or set of execution resources. Thread safety is supported by locking the
  virtual machine, with concurrent JavaScript execution supported by allocating
  separate instances of JSVirtualMachine.
+
+ A virtual machine may need to run deferred tasks on a run loop, such as garbage collection
+ or resolving WebAssembly compilations. By default, a virtual machine will use the run loop
+ of the thread it was initialized on. Currently, there is no API to change a
+ JSVirtualMachine's run loop once it has been initialized.
 */
 NS_CLASS_AVAILABLE(10_9, 7_0)
 @interface JSVirtualMachine : NSObject
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 55569ac..3ef24ed 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2018-04-24  Keith Miller  <keith_miller@apple.com>
+
+        Update API docs with information on which run loop the VM will use
+        https://bugs.webkit.org/show_bug.cgi?id=184900
+        <rdar://problem/39166054>
+
+        Reviewed by Mark Lam.
+
+        * API/JSContextRef.h:
+        * API/JSVirtualMachine.h:
+
 2018-04-24  Filip Pizlo  <fpizlo@apple.com>
 
         $vm.totalGCTime() should be a thing