Skip to content

Commit

Permalink
src: remove tracking for exception arrow data
Browse files Browse the repository at this point in the history
This is unnecessary since we only run `AppendExceptionLine()`
once per exception at this point anyway.

PR-URL: #17394
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
addaleax committed Dec 5, 2017
1 parent 92011e4 commit aeddc36
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
1 change: 0 additions & 1 deletion src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class ModuleWrap;
V(contextify_global_private_symbol, "node:contextify:global") \
V(decorated_private_symbol, "node:decorated") \
V(npn_buffer_private_symbol, "node:npnBuffer") \
V(processed_private_symbol, "node:processed") \
V(selected_npn_buffer_private_symbol, "node:selectedNpnBuffer") \
V(domain_private_symbol, "node:domain") \

Expand Down
10 changes: 0 additions & 10 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1301,16 +1301,6 @@ void AppendExceptionLine(Environment* env,
Local<Object> err_obj;
if (!er.IsEmpty() && er->IsObject()) {
err_obj = er.As<Object>();

auto context = env->context();
auto processed_private_symbol = env->processed_private_symbol();
// Do it only once per message
if (err_obj->HasPrivate(context, processed_private_symbol).FromJust())
return;
err_obj->SetPrivate(
context,
processed_private_symbol,
True(env->isolate()));
}

// Print (filename):(line number): (message).
Expand Down
4 changes: 1 addition & 3 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,7 @@ class ContextifyScript : public BaseObject {
compile_options);

if (v8_script.IsEmpty()) {
if (display_errors) {
DecorateErrorStack(env, try_catch);
}
DecorateErrorStack(env, try_catch);
try_catch.ReThrow();
return;
}
Expand Down

0 comments on commit aeddc36

Please sign in to comment.