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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 3005113002: [kernel] Don't output a -1 token position, it will crash observatory. (Closed)
Patch Set: Created 3 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 274a4654bbe6664d5add3cdc6e39fd360e602184..96b4ed696840f5bc20b37cad9d33407ec2f1c96a 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -4640,14 +4640,14 @@ TokenPosition StreamingFlowGraphBuilder::ReadPosition(bool record) {
void StreamingFlowGraphBuilder::record_token_position(TokenPosition position) {
if (record_for_script_id_ == current_script_id_ &&
- record_token_positions_into_ != NULL) {
+ record_token_positions_into_ != NULL && position.IsReal()) {
record_token_positions_into_->Add(position.value());
}
}
void StreamingFlowGraphBuilder::record_yield_position(TokenPosition position) {
if (record_for_script_id_ == current_script_id_ &&
- record_yield_positions_into_ != NULL) {
+ record_yield_positions_into_ != NULL && position.IsReal()) {
record_yield_positions_into_->Add(position.value());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698