Suppress exceptions due to exception meta-data
Associating exception meta-data may throw an exception if the browser is under memory pressure. This CL adds a try-catch scope to prevent surfacing of said exceptions in Chrome. Bug: chromium:1226360 Change-Id: Ide969273b2ac6dc109370ba2adcb20586ef30bff Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008214 Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#75580}
This commit is contained in:
parent
dc6acd1533
commit
668e48bd49
@ -402,6 +402,7 @@ V8ConsoleMessage::getAssociatedExceptionData(
|
||||
inspector->getAssociatedExceptionData(exception);
|
||||
v8::Local<v8::Object> data;
|
||||
if (!maybe_data.ToLocal(&data)) return nullptr;
|
||||
v8::TryCatch tryCatch(isolate);
|
||||
v8::MicrotasksScope microtasksScope(isolate,
|
||||
v8::MicrotasksScope::kDoNotRunMicrotasks);
|
||||
v8::Context::Scope contextScope(context);
|
||||
|
@ -512,6 +512,7 @@ bool V8InspectorImpl::associateExceptionData(v8::Local<v8::Context>,
|
||||
}
|
||||
v8::Local<v8::Context> context;
|
||||
if (!exceptionMetaDataContext().ToLocal(&context)) return false;
|
||||
v8::TryCatch tryCatch(m_isolate);
|
||||
v8::Context::Scope contextScope(context);
|
||||
v8::HandleScope handles(m_isolate);
|
||||
if (m_exceptionMetaData.IsEmpty())
|
||||
|
Loading…
Reference in New Issue
Block a user