diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/runtime.rs | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index d8355ae6d..be777bdf7 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -196,7 +196,6 @@ fn v8_init( " --no-validate-asm", " --turbo_fast_api_calls", " --harmony-change-array-by-copy", - " --no-harmony-rab-gsab", ); if predictable { @@ -1527,6 +1526,10 @@ pub(crate) fn exception_to_err_result<T>( let state_rc = JsRuntime::state(scope); let was_terminating_execution = scope.is_execution_terminating(); + // Disable running microtasks for a moment. When upgrading to V8 v11.4 + // we discovered that canceling termination here will cause the queued + // microtasks to run which breaks some tests. + scope.set_microtasks_policy(v8::MicrotasksPolicy::Explicit); // If TerminateExecution was called, cancel isolate termination so that the // exception can be created. Note that `scope.is_execution_terminating()` may // have returned false if TerminateExecution was indeed called but there was @@ -1560,6 +1563,7 @@ pub(crate) fn exception_to_err_result<T>( // Resume exception termination. scope.terminate_execution(); } + scope.set_microtasks_policy(v8::MicrotasksPolicy::Auto); Err(js_error.into()) } @@ -4738,25 +4742,6 @@ Deno.core.opAsync("op_async_serialize_object_with_numbers_as_keys", { } #[test] - fn test_resizable_array_buffer() { - // Verify that "resizable ArrayBuffer" is disabled - let mut runtime = JsRuntime::new(Default::default()); - runtime - .execute_script_static( - "test_rab.js", - r#"const a = new ArrayBuffer(100, {maxByteLength: 200}); - if (a.byteLength !== 100) { - throw new Error('wrong byte length'); - } - if (a.maxByteLength !== undefined) { - throw new Error("ArrayBuffer shouldn't have maxByteLength"); - } - "#, - ) - .unwrap(); - } - - #[test] fn test_non_existent_async_op_error() { // Verify that "resizable ArrayBuffer" is disabled let mut runtime = JsRuntime::new(Default::default()); |