Changeset 48282 in vbox for trunk/src/libs/xpcom18a4/xpcom/components
- Timestamp:
- Sep 4, 2013 11:59:15 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp
r38276 r48282 675 675 *registered = PR_FALSE; 676 676 677 #ifndef VBOX 677 678 /* this should be a pref or registry entry, or something */ 678 679 static const char *ValidDllExtensions[] = { … … 749 750 // Skip invalid extensions 750 751 return NS_OK; 752 753 #else /* VBOX */ 754 /* VBox: Only one valid suffix exist, so dispense with the the list. */ 755 # ifdef RT_OS_DARWIN 756 # ifdef VBOX_IN_32_ON_64_MAIN_API 757 static const char s_szSuff[] = "-x86.dylib"; 758 # else 759 static const char s_szSuff[] = ".dylib"; 760 static const char s_szSuffInvalid[] = "-x86.dylib"; 761 # endif 762 # elif defined(RT_OS_OS2) || defined(RT_OS_WINDOWS) 763 # ifdef VBOX_IN_32_ON_64_MAIN_API 764 static const char s_szSuff[] = "-x86.dll"; 765 #else 766 static const char s_szSuff[] = ".dll"; 767 static const char s_szSuffInvalid[] = "-x86.dll"; 768 # endif 769 # else 770 # ifdef VBOX_IN_32_ON_64_MAIN_API 771 static const char s_szSuff[] = "-x86.so"; 772 #else 773 static const char s_szSuff[] = ".so"; 774 static const char s_szSuffInvalid[] = "-x86.so"; 775 # endif 776 # endif 777 778 nsCAutoString strLeafName; 779 rv = component->GetNativeLeafName(strLeafName); 780 if (NS_FAILED(rv)) 781 return rv; 782 size_t cchLeafName = strLeafName.Length(); 783 if ( cchLeafName <= sizeof(s_szSuff) 784 || PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuff) + 1, s_szSuff)) 785 { 786 PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("Skipping '%s'...", strLeafName.get())); 787 return NS_OK; /* skip */ 788 } 789 # ifndef VBOX_IN_32_ON_64_MAIN_API 790 if ( cchLeafName >= sizeof(s_szSuffInvalid) 791 && !PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuffInvalid) + 1, s_szSuffInvalid)) 792 { 793 PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("Skipping '%s' (#2)...", strLeafName.get())); 794 return NS_OK; /* skip */ 795 } 796 # endif 797 PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("... '%s'", strLeafName.get())); 798 #endif /* VBOX */ 751 799 752 800 nsXPIDLCString persistentDescriptor;
Note:
See TracChangeset
for help on using the changeset viewer.