Commit a5941ae4 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Reland of [interpreter] Make d8's TryCatch block be verbose. (patchset #1 id:1...

Reland of [interpreter] Make d8's TryCatch block be verbose. (patchset #1 id:1 of https://codereview.chromium.org/1694523003/ )

Reason for revert:
No fix needed, original CL was perfectly fine!

Original issue's description:
> Revert of [interpreter] Make d8's TryCatch block be verbose. (patchset #3 id:40001 of https://codereview.chromium.org/1691723002/ )
>
> Reason for revert:
> [Sheriff] Speculative revert. Breaks
> https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/3944
>
> Somehow https://chromium.googlesource.com/v8/v8/+/3a2fbc3a4ed2802b52659df2209b930200d63b29 seems to hide it again and then https://chromium.googlesource.com/v8/v8/+/699e1081a658ff62df6df1efe7db2b250111dedd lets it show up again.
>
> Reproduced locally.
>
> Original issue's description:
> > [interpreter] Make d8's TryCatch block be verbose.
> >
> > This changes "d8" to no longer report exceptions as being "caught" when
> > it comes to the catch prediction mechanism in our debugger. This treats
> > scripts as being truly top-level when it comes to exception handling and
> > will allow us to properly test the catch prediction mechanism using just
> > mjsunit tests alone.
> >
> > R=yangguo@chromium.org
> > BUG=v8:4674
> > LOG=n
> >
> > Committed: https://crrev.com/fb1de271a6bc2c89a1682db8c151cf5fcda86c45
> > Cr-Commit-Position: refs/heads/master@{#33898}
>
> TBR=yangguo@chromium.org,mstarzinger@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4674
>
> Committed: https://crrev.com/f9eef1f33d2e5cde8cb948424e7ebf509090aa59
> Cr-Commit-Position: refs/heads/master@{#33921}

TBR=yangguo@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4674

Review URL: https://codereview.chromium.org/1692133002

Cr-Commit-Position: refs/heads/master@{#33931}
parent 7a5b2339
...@@ -375,6 +375,7 @@ bool Shell::ExecuteString(Isolate* isolate, Local<String> source, ...@@ -375,6 +375,7 @@ bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
bool report_exceptions, SourceType source_type) { bool report_exceptions, SourceType source_type) {
HandleScope handle_scope(isolate); HandleScope handle_scope(isolate);
TryCatch try_catch(isolate); TryCatch try_catch(isolate);
try_catch.SetVerbose(true);
MaybeLocal<Value> maybe_result; MaybeLocal<Value> maybe_result;
{ {
...@@ -1247,6 +1248,10 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) { ...@@ -1247,6 +1248,10 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
return global_template; return global_template;
} }
static void EmptyMessageCallback(Local<Message> message, Local<Value> error) {
// Nothing to be done here, exceptions thrown up to the shell will be reported
// separately by {Shell::ReportException} after they are caught.
}
void Shell::Initialize(Isolate* isolate) { void Shell::Initialize(Isolate* isolate) {
#ifndef V8_SHARED #ifndef V8_SHARED
...@@ -1254,6 +1259,8 @@ void Shell::Initialize(Isolate* isolate) { ...@@ -1254,6 +1259,8 @@ void Shell::Initialize(Isolate* isolate) {
if (i::StrLength(i::FLAG_map_counters) != 0) if (i::StrLength(i::FLAG_map_counters) != 0)
MapCounters(isolate, i::FLAG_map_counters); MapCounters(isolate, i::FLAG_map_counters);
#endif // !V8_SHARED #endif // !V8_SHARED
// Disable default message reporting.
isolate->AddMessageListener(EmptyMessageCallback);
} }
......
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