mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add js.disable_jit
pref (#34231)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
5e7664b72e
commit
873e82a532
3 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use js::jsapi::JSObject;
|
||||
use servo_config::pref;
|
||||
|
||||
use crate::dom::bindings::codegen::RegisterBindings;
|
||||
use crate::dom::bindings::conversions::is_dom_proxy;
|
||||
|
@ -61,6 +62,9 @@ unsafe extern "C" fn is_dom_object(obj: *mut JSObject) -> bool {
|
|||
#[allow(unsafe_code)]
|
||||
pub fn init() -> JSEngineSetup {
|
||||
unsafe {
|
||||
if pref!(js.disable_jit) {
|
||||
js::jsapi::DisableJitBackend();
|
||||
}
|
||||
proxyhandler::init();
|
||||
|
||||
// Create the global vtables used by the (generated) DOM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue