Backout e28405983f87, Likely causing startup crashes (bug 805432) r=me
authorMark Finkle <mfinkle@mozilla.com>
Thu, 25 Oct 2012 13:01:13 -0400
changeset 111471 972986c4f75e2e044be6312d700280327cf5ff56
parent 111470 32f9f7af31a1841d2f026ec19bc93f3b03124d9d
child 111472 b3b871ca74803c4c0e5f9023c53f222a1320ec7f
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersme
bugs805432
milestone19.0a1
backs oute28405983f87a25459ec3af29590bb096869796e
Backout e28405983f87, Likely causing startup crashes (bug 805432) r=me
mozglue/android/SQLiteBridge.cpp
mozglue/android/SQLiteBridge.h
--- a/mozglue/android/SQLiteBridge.cpp
+++ b/mozglue/android/SQLiteBridge.cpp
@@ -21,17 +21,16 @@
 
 #define SQLITE_WRAPPER_INT(name) name ## _t f_ ## name;
 
 SQLITE_WRAPPER_INT(sqlite3_open)
 SQLITE_WRAPPER_INT(sqlite3_errmsg)
 SQLITE_WRAPPER_INT(sqlite3_prepare_v2)
 SQLITE_WRAPPER_INT(sqlite3_bind_parameter_count)
 SQLITE_WRAPPER_INT(sqlite3_bind_text)
-SQLITE_WRAPPER_INT(sqlite3_bind_null)
 SQLITE_WRAPPER_INT(sqlite3_step)
 SQLITE_WRAPPER_INT(sqlite3_column_count)
 SQLITE_WRAPPER_INT(sqlite3_finalize)
 SQLITE_WRAPPER_INT(sqlite3_close)
 SQLITE_WRAPPER_INT(sqlite3_column_name)
 SQLITE_WRAPPER_INT(sqlite3_column_type)
 SQLITE_WRAPPER_INT(sqlite3_column_blob)
 SQLITE_WRAPPER_INT(sqlite3_column_bytes)
@@ -248,24 +247,16 @@ sqliteInternalCall(JNIEnv* jenv,
         goto error_close;
     }
 
     if (jParams != NULL) {
         // Bind parameters, if any
         if (numPars > 0) {
             for (int i = 0; i < numPars; i++) {
                 jobject jObjectParam = jenv->GetObjectArrayElement(jParams, i);
-                if (jObjectParam == NULL) {
-                  rc = f_sqlite3_bind_null(ppStmt, i + 1);
-                  if (rc != SQLITE_OK) {
-                      asprintf(&errorMsg, "Error binding null query parameter");
-                      goto error_close;
-                  }
-                  continue;
-                }
                 // IsInstanceOf or isAssignableFrom? String is final, so IsInstanceOf
                 // should be OK.
                 jboolean isString = jenv->IsInstanceOf(jObjectParam, stringClass);
                 if (isString != JNI_TRUE) {
                     asprintf(&errorMsg, "Parameter is not of String type");
                     goto error_close;
                 }
                 jstring jStringParam = (jstring)jObjectParam;
--- a/mozglue/android/SQLiteBridge.h
+++ b/mozglue/android/SQLiteBridge.h
@@ -13,17 +13,16 @@ void setup_sqlite_functions(void *sqlite
 typedef return_type (*name ## _t)(args);  \
 extern name ## _t f_ ## name;
 
 SQLITE_WRAPPER(sqlite3_open, int, const char*, sqlite3**)
 SQLITE_WRAPPER(sqlite3_errmsg, const char*, sqlite3*)
 SQLITE_WRAPPER(sqlite3_prepare_v2, int, sqlite3*, const char*, int, sqlite3_stmt**, const char**)
 SQLITE_WRAPPER(sqlite3_bind_parameter_count, int, sqlite3_stmt*)
 SQLITE_WRAPPER(sqlite3_bind_text, int, sqlite3_stmt*, int, const char*, int, void(*)(void*))
-SQLITE_WRAPPER(sqlite3_bind_null, int, sqlite3_stmt*, int)
 SQLITE_WRAPPER(sqlite3_step, int, sqlite3_stmt*)
 SQLITE_WRAPPER(sqlite3_column_count, int, sqlite3_stmt*)
 SQLITE_WRAPPER(sqlite3_finalize, int, sqlite3_stmt*)
 SQLITE_WRAPPER(sqlite3_close, int, sqlite3*)
 SQLITE_WRAPPER(sqlite3_column_name, const char*, sqlite3_stmt*, int)
 SQLITE_WRAPPER(sqlite3_column_type, int, sqlite3_stmt*, int)
 SQLITE_WRAPPER(sqlite3_column_blob, const void*, sqlite3_stmt*, int)
 SQLITE_WRAPPER(sqlite3_column_bytes, int, sqlite3_stmt*, int)