Skip to content
  • ap@webkit.org's avatar
    Reviewed by Geoff Garen. · 17b9b2c7
    ap@webkit.org authored
            Implement JSContextGroup APIs to make concurrent execution possible for
            JavaScriptCore clients.
    
            This changes the behavior of JSGlobalContextCreate(), so that it now uses a private context
            group for each context, making JSlock implicit locking unnecessary.
    
            * API/JSContextRef.h:
            * API/JSContextRef.cpp:
            (JSContextGroupCreate):
            (JSContextGroupRetain):
            (JSContextGroupRelease):
            (JSGlobalContextCreate):
            (JSGlobalContextCreateInGroup):
            (JSGlobalContextRelease):
            (JSContextGetGroup):
            Added new methods. JSGlobalContextCreate() calls JSGlobalContextCreateInGroup() now.
    
            * API/APICast.h: (toJS): (toRef): Added converters for JSContextGroupRef.
            * API/JSBase.cpp: (JSGarbageCollect): JSGarbageCollect(0) is now a no-op, and the passed in
            context is actually used.
    
            * API/JSBase.h: Aded a typedef for JSContextGroupRef. Updated documentation for
            JSGarbageCollect().
    
            * JavaScriptCore.exp: Removed JSGlobalData::sharedInstance().
    
            * kjs/JSGlobalData.cpp:
            * kjs/JSGlobalData.h:
            Removed support for JSGlobalData shared instance. JSGlobalData::isSharedInstance member
            variable still remains, to be deleted in a followup patch.
    
            * kjs/JSLock.cpp: (KJS::JSLock::JSLock): Disabled JSLock, to be deleted in a follow-up patch.
            
            * kjs/collector.cpp:
            (KJS::Heap::markOtherThreadConservatively): Removed an assertion that referenced
            JSGlobalData::sharedInstance.
    
            * kjs/collector.h: Made Heap destructor public, so that JSContextRelease can use it.
    
    JavaScriptGlue:
            * JSRun.cpp:
            (JSRun::JSRun):
            * JSUtils.cpp:
            (getThreadGlobalExecState):
            Changed JavaScriptGlue to use a JSGlobalData of its own, now that there is no shared
            instance.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    17b9b2c7