Changeset 35442 in webkit for trunk/JavaScriptCore/API/JSContextRef.h
- Timestamp:
- Jul 29, 2008, 11:05:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSContextRef.h
r34606 r35442 29 29 #include <JavaScriptCore/JSObjectRef.h> 30 30 #include <JavaScriptCore/JSValueRef.h> 31 #include <JavaScriptCore/WebKitAvailability.h> 31 32 32 33 #ifndef __cplusplus … … 40 41 /*! 41 42 @function 43 @abstract Creates a JavaScript context group. 44 @discussion A JSContextGroup associates JavaScript contexts with one another. 45 Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging 46 JavaScript objects between contexts in different groups will produce undefined behavior. 47 When objects from the same context group are used in multiple threads, explicit 48 synchronization is required. 49 @result The created JSContextGroup. 50 */ 51 JS_EXPORT JSContextGroupRef JSContextGroupCreate() AVAILABLE_AFTER_WEBKIT_VERSION_3_1; 52 53 /*! 54 @function 55 @abstract Retains a JavaScript context group. 56 @param group The JSContextGroup to retain. 57 @result A JSContextGroup that is the same as group. 58 */ 59 JS_EXPORT JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) AVAILABLE_AFTER_WEBKIT_VERSION_3_1; 60 61 /*! 62 @function 63 @abstract Releases a JavaScript context group. 64 @param group The JSContextGroup to release. 65 */ 66 JS_EXPORT void JSContextGroupRelease(JSContextGroupRef group) AVAILABLE_AFTER_WEBKIT_VERSION_3_1; 67 68 /*! 69 @function 42 70 @abstract Creates a global JavaScript execution context. 43 71 @discussion JSGlobalContextCreate allocates a global object and populates it with all the 44 72 built-in JavaScript objects, such as Object, Function, String, and Array. 73 The global context is created in a unique context group. 45 74 @param globalObjectClass The class to use when creating the global object. Pass 46 75 NULL to use the default object class. … … 48 77 */ 49 78 JS_EXPORT JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass); 79 80 /*! 81 @function 82 @abstract Creates a global JavaScript execution context in the context group provided. 83 @discussion JSGlobalContextCreateInGroup allocates a global object and populates it with 84 all the built-in JavaScript objects, such as Object, Function, String, and Array. 85 @param globalObjectClass The class to use when creating the global object. Pass 86 NULL to use the default object class. 87 @param group The context group to use. The created global context retains the group. 88 @result A JSGlobalContext with a global object of class globalObjectClass and a context 89 group equal to group. 90 */ 91 JS_EXPORT JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass) AVAILABLE_AFTER_WEBKIT_VERSION_3_1; 50 92 51 93 /*! … … 72 114 JS_EXPORT JSObjectRef JSContextGetGlobalObject(JSContextRef ctx); 73 115 116 /*! 117 @function 118 @abstract Gets the context group to which a JavaScript execution context belongs. 119 @param ctx The JSContext whose group you want to get. 120 @result ctx's group. 121 */ 122 JS_EXPORT JSContextGroupRef JSContextGetGroup(JSContextRef ctx) AVAILABLE_AFTER_WEBKIT_VERSION_3_1; 123 74 124 #ifdef __cplusplus 75 125 }
Note:
See TracChangeset
for help on using the changeset viewer.