diff --git a/content/base/src/nsDOMFileReader.cpp b/content/base/src/nsDOMFileReader.cpp index 502e1d1ccb1..dca4aca1412 100644 --- a/content/base/src/nsDOMFileReader.cpp +++ b/content/base/src/nsDOMFileReader.cpp @@ -242,6 +242,9 @@ nsDOMFileReader::GetResult(JSContext* aCx, jsval* aResult) } else { *aResult = JSVAL_NULL; } + if (!JS_WrapValue(aCx, aResult)) { + return NS_ERROR_FAILURE; + } return NS_OK; }