mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #11230 - Ms2ger:request, r=nox
Remove Request handling from CallSetup. Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy --faster` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). Either: - [ ] There are tests for these changes OR - [x] These changes do not require tests because no behaviour changes Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11230) <!-- Reviewable:end -->
This commit is contained in:
commit
985086501a
1 changed files with 0 additions and 7 deletions
|
@ -12,7 +12,6 @@ use js::jsapi::JSAutoCompartment;
|
|||
use js::jsapi::{Heap, MutableHandleObject, RootedObject, RootedValue};
|
||||
use js::jsapi::{IsCallable, JSContext, JSObject, JS_WrapObject};
|
||||
use js::jsapi::{JSCompartment, JS_EnterCompartment, JS_LeaveCompartment};
|
||||
use js::jsapi::{JS_BeginRequest, JS_EndRequest};
|
||||
use js::jsapi::{JS_GetProperty, JS_IsExceptionPending, JS_ReportPendingException};
|
||||
use js::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain};
|
||||
use js::jsval::{JSVal, UndefinedValue};
|
||||
|
@ -168,9 +167,6 @@ impl CallSetup {
|
|||
pub fn new<T: CallbackContainer>(callback: &T, handling: ExceptionHandling) -> CallSetup {
|
||||
let global = global_root_from_object(callback.callback());
|
||||
let cx = global.r().get_cx();
|
||||
unsafe {
|
||||
JS_BeginRequest(cx);
|
||||
}
|
||||
|
||||
let exception_compartment = unsafe {
|
||||
GetGlobalForObjectCrossCompartment(callback.callback())
|
||||
|
@ -211,8 +207,5 @@ impl Drop for CallSetup {
|
|||
}
|
||||
}
|
||||
}
|
||||
unsafe {
|
||||
JS_EndRequest(self.cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue