Bug 1014965 - NativeJSObject.optString does the wrong thing on "key":null, r=jchen, f=nalexander

This commit is contained in:
Mark Capella
2014-05-28 17:04:56 -04:00
parent 735385d259
commit 763e8ed5f4
3 changed files with 18 additions and 1 deletions

View File

@@ -668,7 +668,7 @@ GetProperty(JNIEnv* env, jobject instance, jstring name,
JS_GetUCProperty(cx, object, strName, strName.Length(), &val))) {
return typename Property::Type();
}
if (val.isUndefined()) {
if (val.isUndefined() || val.isNull()) {
if (option == FallbackOption::THROW) {
AndroidBridge::ThrowException(env,
"java/lang/IllegalArgumentException",