Bug 1079621 - Return error instead of asserting. r=kinetik, a=lmandel

From c2a87a986f6d0ed699ab0fbf5687d8aa5fea8ff0 Mon Sep 17 00:00:00 2001
NS_ASSERTION is debug-only, and fails silently in continuous
integration. Better to return an error here, since failure
could result in a crash later.