Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: runtime/vm/parser.cc

Issue 893193004: Propagate the stack trace of the inner-most throw when using async/await. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 3ffb3f6e31835aad94bb4ce4d44d79431d5f3422..b161e5595db4d7fa54988a0f597a10f20ab59215 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3083,9 +3083,14 @@ SequenceNode* Parser::ParseFunc(const Function& func,
error_param.name = &Symbols::AsyncOperationErrorParam();
error_param.default_value = &Object::null_instance();
error_param.type = &dynamic_type;
+ ParamDesc stack_trace_param;
+ stack_trace_param.name = &Symbols::AsyncOperationStackTraceParam();
+ stack_trace_param.default_value = &Object::null_instance();
+ stack_trace_param.type = &dynamic_type;
params.parameters->Add(result_param);
params.parameters->Add(error_param);
- params.num_optional_parameters += 2;
+ params.parameters->Add(stack_trace_param);
+ params.num_optional_parameters += 3;
params.has_optional_positional_parameters = true;
SetupDefaultsForOptionalParams(&params, default_parameter_values);
AddFormalParamsToScope(&params, current_block_->scope);
@@ -6068,8 +6073,13 @@ RawFunction* Parser::OpenAsyncFunction(intptr_t async_func_pos) {
error_param.default_value = &Object::null_instance();
error_param.type = &dynamic_type;
closure_params.parameters->Add(error_param);
+ ParamDesc stack_trace_param;
+ stack_trace_param.name = &Symbols::AsyncOperationStackTraceParam();
+ stack_trace_param.default_value = &Object::null_instance();
+ stack_trace_param.type = &dynamic_type;
+ closure_params.parameters->Add(stack_trace_param);
closure_params.has_optional_positional_parameters = true;
- closure_params.num_optional_parameters += 2;
+ closure_params.num_optional_parameters += 3;
if (is_new_closure) {
// Add the parameters to the newly created closure.
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698