OSDN Git Service

resolved conflicts for merge of d0d351b2 to gingerbread-plus-aosp
authorDavid 'Digit' Turner <digit@google.com>
Mon, 11 Jul 2011 21:20:22 +0000 (23:20 +0200)
committerDavid 'Digit' Turner <digit@google.com>
Mon, 11 Jul 2011 21:43:07 +0000 (23:43 +0200)
Change-Id: I1594c21fb3dd761b1e2275be2019ec139cf64174

libdex/CmdUtils.c
libdex/ZipArchive.c
vm/Jni.c

index e8fc635..8ce0d4b 100644 (file)
@@ -160,9 +160,6 @@ UnzipToFileResult dexOpenAndMap(const char* fileName, const char* tempFileName,
     /*
      * Pop open the (presumed) DEX file.
      */
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
     fd = open(fileName, O_RDONLY | O_BINARY);
     if (fd < 0) {
         if (!quiet) {
index 7feb417..efe9f79 100644 (file)
@@ -341,9 +341,6 @@ int dexZipOpenArchive(const char* fileName, ZipArchive* pArchive)
 
     memset(pArchive, 0, sizeof(ZipArchive));
 
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
     fd = open(fileName, O_RDONLY | O_BINARY, 0);
     if (fd < 0) {
         err = errno ? errno : -1;
index ef0749a..0c6509a 100644 (file)
--- a/vm/Jni.c
+++ b/vm/Jni.c
@@ -566,6 +566,8 @@ static inline ReferenceTable* getLocalRefTable(JNIEnv* env)
  * reference may be local, global, or weak-global.
  *
  * If "jobj" is NULL or an invalid indirect reference, this returns NULL.
+ *
+ * Note "env" may be NULL when decoding global references.
  */
 Object* dvmDecodeIndirectRef(JNIEnv* env, jobject jobj)
 {
@@ -3856,7 +3858,7 @@ static jint attachThread(JavaVM* vm, JNIEnv** p_env, void* thr_args,
         argsCopy.version = args->version;
         argsCopy.name = args->name;
         if (args->group != NULL)
-            argsCopy.group = args->group;
+            argsCopy.group = dvmDecodeIndirectRef(NULL, args->group);
         else
             argsCopy.group = dvmGetMainThreadGroup();
     }