Changeset 15241 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jul 8, 2006, 9:58:18 PM (19 years ago)
Author:
thatcher
Message:

Reviewed by Maciej.

Moved KJS_GetCreatedJavaVMs to jni_utility.cpp.
Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym
now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol
are deprecated in Leopard.

  • JavaScriptCore.exp:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bindings/jni/jni_utility.cpp: (KJS::Bindings::KJS_GetCreatedJavaVMs):
  • bindings/softlinking.c: Removed.
  • bindings/softlinking.h: Removed.
Location:
trunk/JavaScriptCore
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r15235 r15241  
     12006-07-08  Timothy Hatcher  <[email protected]>
     2
     3        Reviewed by Maciej.
     4
     5        Moved KJS_GetCreatedJavaVMs to jni_utility.cpp.
     6        Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym
     7        now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol
     8        are deprecated in Leopard.
     9
     10        * JavaScriptCore.exp:
     11        * JavaScriptCore.xcodeproj/project.pbxproj:
     12        * bindings/jni/jni_utility.cpp:
     13        (KJS::Bindings::KJS_GetCreatedJavaVMs):
     14        * bindings/softlinking.c: Removed.
     15        * bindings/softlinking.h: Removed.
     16
    1172006-07-08  Geoffrey Garen  <[email protected]>
    218
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r15225 r15241  
    7171_JSValueToNumber
    7272_JSValueToObject
    73 _KJS_GetCreatedJavaVMs
    7473_KJS_JSCreateNativeJSObject
    7574_KJS_JSObject_JSFinalize
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r15211 r15241  
    237237                932F5BCE0822A1C700736975 /* WebScriptObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51863FC406542D3100E9E8DD /* WebScriptObject.mm */; };
    238238                932F5BCF0822A1C700736975 /* jni_objc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517EF37306D695930007C1BA /* jni_objc.mm */; };
    239                 932F5BD00822A1C700736975 /* softlinking.c in Sources */ = {isa = PBXBuildFile; fileRef = 8442A376074175C2000AE2ED /* softlinking.c */; };
    240239                932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; };
    241240                932F5BD40822A1C700736975 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A63D04B3B69F008AE952 /* CoreServices.framework */; };
     
    258257                93E26BFE08B151D400F85226 /* ucpinternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E26BFC08B151D400F85226 /* ucpinternal.h */; };
    259258                93E26C1308B1523D00F85226 /* ucptable.c in Headers */ = {isa = PBXBuildFile; fileRef = 93E26C0D08B1520900F85226 /* ucptable.c */; };
    260                 93E26CCF08B2921900F85226 /* softlinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E26CCE08B2921900F85226 /* softlinking.h */; };
    261259                93E26CF708B29A1C00F85226 /* pcre_get.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26CF608B29A1C00F85226 /* pcre_get.c */; };
    262260                93E26DDC08B2A4F400F85226 /* pcre_printint.c in Sources */ = {isa = PBXBuildFile; fileRef = 93E26DDB08B2A4F400F85226 /* pcre_printint.c */; };
     
    475473                70B16A260569A10900DB756D /* runtime_object.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; name = runtime_object.cpp; path = bindings/runtime_object.cpp; sourceTree = "<group>"; tabWidth = 8; };
    476474                70B16A270569A10900DB756D /* runtime_object.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; name = runtime_object.h; path = bindings/runtime_object.h; sourceTree = "<group>"; tabWidth = 8; };
    477                 8442A376074175C2000AE2ED /* softlinking.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; name = softlinking.c; path = bindings/softlinking.c; sourceTree = "<group>"; tabWidth = 8; };
    478475                84ABF1DE070B628C00A3AC05 /* npruntime_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; name = npruntime_impl.h; path = bindings/npruntime_impl.h; sourceTree = "<group>"; tabWidth = 8; };
    479476                9303F567099118FA00AD71B8 /* OwnPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OwnPtr.h; sourceTree = "<group>"; };
     
    511508                93E26BFC08B151D400F85226 /* ucpinternal.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; name = ucpinternal.h; path = pcre/ucpinternal.h; sourceTree = "<group>"; tabWidth = 8; };
    512509                93E26C0D08B1520900F85226 /* ucptable.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; indentWidth = 4; name = ucptable.c; path = pcre/ucptable.c; sourceTree = "<group>"; tabWidth = 8; };
    513                 93E26CCE08B2921900F85226 /* softlinking.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; name = softlinking.h; path = bindings/softlinking.h; sourceTree = "<group>"; tabWidth = 8; };
    514510                93E26CF608B29A1C00F85226 /* pcre_get.c */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.c; name = pcre_get.c; path = pcre/pcre_get.c; sourceTree = "<group>"; tabWidth = 8; };
    515511                93E26DDB08B2A4F400F85226 /* pcre_printint.c */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.c; name = pcre_printint.c; path = pcre/pcre_printint.c; sourceTree = "<group>"; tabWidth = 8; };
     
    774770                                5114F47B05E4426200D1BBBD /* runtime_root.cpp */,
    775771                                5114F47C05E4426200D1BBBD /* runtime_root.h */,
    776                                 8442A376074175C2000AE2ED /* softlinking.c */,
    777                                 93E26CCE08B2921900F85226 /* softlinking.h */,
    778772                                51863F6F065420E800E9E8DD /* WebScriptObject.h */,
    779773                                51863FC406542D3100E9E8DD /* WebScriptObject.mm */,
     
    10771071                                93E26BFE08B151D400F85226 /* ucpinternal.h in Headers */,
    10781072                                93E26C1308B1523D00F85226 /* ucptable.c in Headers */,
    1079                                 93E26CCF08B2921900F85226 /* softlinking.h in Headers */,
    10801073                                652C107F08DA7B1E0020887D /* protected_reference.h in Headers */,
    10811074                                65E217BD08E7EECC0023E5F6 /* Assertions.h in Headers */,
     
    13901383                                932F5BCE0822A1C700736975 /* WebScriptObject.mm in Sources */,
    13911384                                932F5BCF0822A1C700736975 /* jni_objc.mm in Sources */,
    1392                                 932F5BD00822A1C700736975 /* softlinking.c in Sources */,
    13931385                                65621E6D089E859700760F35 /* property_slot.cpp in Sources */,
    13941386                                930754C108B0F68000AB3056 /* pcre_compile.c in Sources */,
  • trunk/JavaScriptCore/bindings/jni/jni_utility.cpp

    r13658 r15241  
    3232#include "runtime_array.h"
    3333#include "runtime_object.h"
    34 #include "softlinking.h"
     34#include <dlfcn.h>
    3535
    3636namespace KJS {
    3737
    3838namespace Bindings {
     39
     40static jint KJS_GetCreatedJavaVMs(JavaVM** vmBuf, jsize bufLen, jsize* nVMs)
     41{
     42    static void* javaVMFramework = 0;
     43    if (!javaVMFramework)
     44        javaVMFramework = dlopen("/System/Library/Frameworks/JavaVM.framework/JavaVM", RTLD_LAZY);
     45    if (!javaVMFramework)
     46        return JNI_ERR;
     47
     48    static jint(*functionPointer)(JavaVM**, jsize, jsize *) = 0;
     49    if (!functionPointer)
     50        functionPointer = (jint(*)(JavaVM**, jsize, jsize *))dlsym(javaVMFramework, "JNI_GetCreatedJavaVMs");
     51    if (!functionPointer)
     52        return JNI_ERR;
     53    return functionPointer(vmBuf, bufLen, nVMs);
     54}
    3955
    4056static JavaVM *jvm = 0;
Note: See TracChangeset for help on using the changeset viewer.