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

Unified Diff: src/objects.cc

Issue 2109093003: [wasm] Enable wasm frame inspection for debugging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/objects.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 6f0f4ace180ccfb8fdfb2997d3de89c4e5becf67..9dec0942c0994539674fdedab311d95a3bcbb789 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12821,7 +12821,8 @@ bool Script::GetPositionInfo(int position, PositionInfo* info,
if (info->line_end > 0) {
DCHECK(script->source()->IsString());
Handle<String> src(String::cast(script->source()));
- if (src->Get(info->line_end - 1) == '\r') {
+ if (src->length() >= info->line_end &&
+ src->Get(info->line_end - 1) == '\r') {
info->line_end--;
}
}
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698