Bug 822094 - Part 1: Unwrap the transfable parameter if allowed. r=sfink

This commit is contained in:
Masatoshi Kimura 2012-12-17 17:43:45 -05:00
parent c6e3e5ce34
commit 23eedb7035

View File

@ -488,7 +488,11 @@ JSStructuredCloneWriter::parseTransferable()
return false;
}
JSObject* tObj = &v.toObject();
JSObject* tObj = UnwrapObjectChecked(&v.toObject());
if (!tObj) {
JS_ReportError(context(), "Permission denied to access object");
return false;
}
if (!tObj->isArrayBuffer()) {
reportErrorTransferable();
return false;