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

Unified Diff: src/messages.h

Issue 861623002: Add a pretty printer to improve the error message non-function calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 5 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/isolate.cc ('k') | src/prettyprinter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.h
diff --git a/src/messages.h b/src/messages.h
index aec346903522a87857284652f646e89a82669469..1dbc0fafc51eceb3974498c54f73f29daef3fcbf 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -43,22 +43,24 @@ class SourceInfo;
class MessageLocation {
public:
- MessageLocation(Handle<Script> script,
- int start_pos,
- int end_pos)
+ MessageLocation(Handle<Script> script, int start_pos, int end_pos,
+ Handle<JSFunction> function = Handle<JSFunction>())
: script_(script),
start_pos_(start_pos),
- end_pos_(end_pos) { }
+ end_pos_(end_pos),
+ function_(function) {}
MessageLocation() : start_pos_(-1), end_pos_(-1) { }
Handle<Script> script() const { return script_; }
int start_pos() const { return start_pos_; }
int end_pos() const { return end_pos_; }
+ Handle<JSFunction> function() const { return function_; }
private:
Handle<Script> script_;
int start_pos_;
int end_pos_;
+ Handle<JSFunction> function_;
};
« no previous file with comments | « src/isolate.cc ('k') | src/prettyprinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698