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

Unified Diff: src/runtime/runtime-generator.cc

Issue 1618343002: [interpreter, debugger] abstraction for source position calculation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus assertion Created 4 years, 11 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/runtime/runtime-function.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-generator.cc
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc
index 54894a013a624d287fe4efe03e04bbc678410527..a718fcc7f8af317eca45b7dd10433b2de53a7a4d 100644
--- a/src/runtime/runtime-generator.cc
+++ b/src/runtime/runtime-generator.cc
@@ -195,11 +195,8 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) {
if (generator->is_suspended()) {
Handle<Code> code(generator->function()->code(), isolate);
int offset = generator->continuation();
-
- RUNTIME_ASSERT(0 <= offset && offset < code->Size());
- Address pc = code->address() + offset;
-
- return Smi::FromInt(code->SourcePosition(pc));
+ RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size());
+ return Smi::FromInt(code->SourcePosition(offset));
}
return isolate->heap()->undefined_value();
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698