diff options
author | Michaël Zasso <targos@protonmail.com> | 2021-07-14 11:30:07 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-07-20 15:24:51 +0200 |
commit | 6cdd310275bb0f8056aa0ae6d95614e9ca5b70c7 (patch) | |
tree | 9ed37b19cd668894854b7f469010f7621e63ef81 /deps/v8/test/cctest/test-api-stack-traces.cc | |
parent | c0f10006c82d2d9896a552de98ed146f9542720d (diff) | |
download | node-new-6cdd310275bb0f8056aa0ae6d95614e9ca5b70c7.tar.gz |
deps: update V8 to 9.2.230.21
PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/test/cctest/test-api-stack-traces.cc')
-rw-r--r-- | deps/v8/test/cctest/test-api-stack-traces.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/deps/v8/test/cctest/test-api-stack-traces.cc b/deps/v8/test/cctest/test-api-stack-traces.cc index 4a55b47e2b..6230081404 100644 --- a/deps/v8/test/cctest/test-api-stack-traces.cc +++ b/deps/v8/test/cctest/test-api-stack-traces.cc @@ -867,14 +867,22 @@ TEST(DynamicWithSourceURLInStackTraceString) { CHECK_NOT_NULL(strstr(*stack, "at foo (source_url:3:5)")); } -TEST(CaptureStackTraceForStackOverflow) { +UNINITIALIZED_TEST(CaptureStackTraceForStackOverflow) { + // We must set FLAG_stack_size before initializing the isolate. v8::internal::FLAG_stack_size = 150; - LocalContext current; - v8::Isolate* isolate = current->GetIsolate(); - v8::HandleScope scope(isolate); - isolate->SetCaptureStackTraceForUncaughtExceptions(true, 10, - v8::StackTrace::kDetailed); - v8::TryCatch try_catch(isolate); - CompileRun("(function f(x) { f(x+1); })(0)"); - CHECK(try_catch.HasCaught()); + v8::Isolate::CreateParams create_params; + create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); + v8::Isolate* isolate = v8::Isolate::New(create_params); + isolate->Enter(); + { + LocalContext current(isolate); + v8::HandleScope scope(isolate); + isolate->SetCaptureStackTraceForUncaughtExceptions( + true, 10, v8::StackTrace::kDetailed); + v8::TryCatch try_catch(isolate); + CompileRun("(function f(x) { f(x+1); })(0)"); + CHECK(try_catch.HasCaught()); + } + isolate->Exit(); + isolate->Dispose(); } |