mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
check same-origin and url against the blob beign revoked
This commit is contained in:
parent
dfa78986a6
commit
2d995ba41a
4 changed files with 18 additions and 47 deletions
|
@ -129,13 +129,15 @@ impl URL {
|
|||
let origin = get_blob_origin(&global.get_url());
|
||||
|
||||
if let Ok(url) = ServoUrl::parse(&url) {
|
||||
if let Ok((id, _)) = parse_blob_url(&url) {
|
||||
let resource_threads = global.resource_threads();
|
||||
let (tx, rx) = ipc::channel(global.time_profiler_chan().clone()).unwrap();
|
||||
let msg = FileManagerThreadMsg::RevokeBlobURL(id, origin, tx);
|
||||
let _ = resource_threads.send(CoreResourceMsg::ToFileManager(msg));
|
||||
if url.fragment().is_none() && origin == get_blob_origin(&url) {
|
||||
if let Ok((id, _)) = parse_blob_url(&url) {
|
||||
let resource_threads = global.resource_threads();
|
||||
let (tx, rx) = ipc::channel(global.time_profiler_chan().clone()).unwrap();
|
||||
let msg = FileManagerThreadMsg::RevokeBlobURL(id, origin, tx);
|
||||
let _ = resource_threads.send(CoreResourceMsg::ToFileManager(msg));
|
||||
|
||||
let _ = rx.recv().unwrap();
|
||||
let _ = rx.recv().unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue