Commit 764fa7e3 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by V8 LUCI CQ

Create objects in the correct context

The exception meta-data API created several objects in the wrong
context, resulting in the exception context being kept alive for
too long.

Bug: chromium:1221089
Change-Id: I02aece4e10d9bd559d49f98fe1c3e44a09e27eef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975301Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75269}
parent e4361df0
......@@ -509,6 +509,7 @@ bool V8InspectorImpl::associateExceptionData(v8::Local<v8::Context>,
v8::Local<v8::Value> value) {
v8::Local<v8::Context> context;
if (!exceptionMetaDataContext().ToLocal(&context)) return false;
v8::Context::Scope contextScope(context);
v8::HandleScope handles(m_isolate);
if (m_exceptionMetaData.IsEmpty())
m_exceptionMetaData.Reset(m_isolate, v8::debug::WeakMap::New(m_isolate));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment