mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Make request parameter immutable in send_response_to_devtools and send_early_httprequest_to_devtools (#38319)
- Changes request parameters to immutable borrow Testing: Fixes: https://github.com/servo/servo/issues/38300 Signed-off-by: uthmaniv <uthmanyahayababa@gmail.com>
This commit is contained in:
parent
d410236c87
commit
25822920cf
1 changed files with 2 additions and 6 deletions
|
@ -433,11 +433,7 @@ pub fn send_request_to_devtools(
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_response_to_devtools(
|
pub fn send_response_to_devtools(request: &Request, context: &FetchContext, response: &Response) {
|
||||||
request: &mut Request,
|
|
||||||
context: &FetchContext,
|
|
||||||
response: &Response,
|
|
||||||
) {
|
|
||||||
if let (Some(devtools_chan), Some(pipeline_id), Some(webview_id)) = (
|
if let (Some(devtools_chan), Some(pipeline_id), Some(webview_id)) = (
|
||||||
context.devtools_chan.as_ref(),
|
context.devtools_chan.as_ref(),
|
||||||
request.pipeline_id,
|
request.pipeline_id,
|
||||||
|
@ -473,7 +469,7 @@ pub fn send_response_to_devtools(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_early_httprequest_to_devtools(request: &mut Request, context: &FetchContext) {
|
pub fn send_early_httprequest_to_devtools(request: &Request, context: &FetchContext) {
|
||||||
if let (Some(devtools_chan), Some(browsing_context_id), Some(pipeline_id)) = (
|
if let (Some(devtools_chan), Some(browsing_context_id), Some(pipeline_id)) = (
|
||||||
context.devtools_chan.as_ref(),
|
context.devtools_chan.as_ref(),
|
||||||
request.target_webview_id.map(|id| id.0),
|
request.target_webview_id.map(|id| id.0),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue