summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/API/JSVirtualMachine.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/JavaScriptCore/API/JSVirtualMachine.h
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/JavaScriptCore/API/JSVirtualMachine.h')
-rw-r--r--Source/JavaScriptCore/API/JSVirtualMachine.h66
1 files changed, 45 insertions, 21 deletions
diff --git a/Source/JavaScriptCore/API/JSVirtualMachine.h b/Source/JavaScriptCore/API/JSVirtualMachine.h
index b50616f4c..ccf9264d5 100644
--- a/Source/JavaScriptCore/API/JSVirtualMachine.h
+++ b/Source/JavaScriptCore/API/JSVirtualMachine.h
@@ -27,30 +27,54 @@
#if JSC_OBJC_API_ENABLED
-// An instance of JSVirtualMachine represents a single JavaScript "object space"
-// 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.
-
-NS_CLASS_AVAILABLE(10_9, NA)
+/*!
+@interface
+@discussion An instance of JSVirtualMachine represents a single JavaScript "object space"
+ 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.
+*/
+NS_CLASS_AVAILABLE(10_9, 7_0)
@interface JSVirtualMachine : NSObject
-// Create a new JSVirtualMachine.
-- (id)init;
-
-// addManagedReference:withOwner and removeManagedReference:withOwner allow
-// clients of JSVirtualMachine to make the JavaScript runtime aware of
-// arbitrary external Objective-C object graphs. The runtime can then use
-// this information to retain any JavaScript values that are referenced
-// from somewhere in said object graph.
-//
-// For correct behavior clients must make their external object graphs
-// reachable from within the JavaScript runtime. If an Objective-C object is
-// reachable from within the JavaScript runtime, all managed references
-// transitively reachable from it as recorded with
-// addManagedReference:withOwner: will be scanned by the garbage collector.
-//
+/*!
+@methodgroup Creating New Virtual Machines
+*/
+/*!
+@method
+@abstract Create a new JSVirtualMachine.
+*/
+- (instancetype)init;
+
+/*!
+@methodgroup Memory Management
+*/
+/*!
+@method
+@abstract Notify the JSVirtualMachine of an external object relationship.
+@discussion Allows clients of JSVirtualMachine to make the JavaScript runtime aware of
+ arbitrary external Objective-C object graphs. The runtime can then use
+ this information to retain any JavaScript values that are referenced
+ from somewhere in said object graph.
+
+ For correct behavior clients must make their external object graphs
+ reachable from within the JavaScript runtime. If an Objective-C object is
+ reachable from within the JavaScript runtime, all managed references
+ transitively reachable from it as recorded using
+ -addManagedReference:withOwner: will be scanned by the garbage collector.
+@param object The object that the owner points to.
+@param owner The object that owns the pointed to object.
+*/
- (void)addManagedReference:(id)object withOwner:(id)owner;
+
+/*!
+@method
+@abstract Notify the JSVirtualMachine that a previous object relationship no longer exists.
+@discussion The JavaScript runtime will continue to scan any references that were
+ reported to it by -addManagedReference:withOwner: until those references are removed.
+@param object The object that was formerly owned.
+@param owner The former owner.
+*/
- (void)removeManagedReference:(id)object withOwner:(id)owner;
@end