Bug 838567 - URL.createObjectURL(new Object()); in Workers crashes debug builds reliably. r=bent

This commit is contained in:
Andrea Marchesini 2013-02-06 10:50:27 -05:00
parent f69ae99aa2
commit 598d08c5e9
2 changed files with 12 additions and 1 deletions

View File

@ -204,7 +204,9 @@ URL::CreateObjectURL(const WorkerGlobalObject& aGlobal, JSObject* aBlob,
nsCOMPtr<nsIDOMBlob> blob = file::GetDOMBlobFromJSObject(aBlob);
if (!blob) {
SetDOMStringToNull(aResult);
aRv.Throw(NS_ERROR_TYPE_ERR);
NS_NAMED_LITERAL_STRING(blobStr, "Blob");
aRv.ThrowTypeError(MSG_DOES_NOT_IMPLEMENT_INTERFACE, &blobStr);
return;
}

View File

@ -59,5 +59,14 @@ onmessage = function() {
postMessage({type: 'status', status: status, msg: 'Blob URL2:' + url});
postMessage({type: 'url', url: url});
status = false;
try {
URL.createObjectURL(new Object());
} catch(e) {
status = true;
}
postMessage({type: 'status', status: status, msg: 'Exception wanted' });
postMessage({type: 'finish' });
}