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

Unified Diff: src/messages.h

Issue 1060583008: Port CallSite methods to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 8 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 | src/messages.cc » ('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 5f7aca3ae12c4101d75b1092303123984843db21..f031496000c2de911813543eb3446cca465195ea 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -88,6 +88,29 @@ class MessageHandler {
};
+class CallSite {
+ public:
+ CallSite(Handle<Object> receiver, Handle<JSFunction> fun, int pos)
+ : receiver_(receiver), fun_(fun), pos_(pos) {}
+
+ Handle<Object> GetFileName(Isolate* isolate);
+ Handle<Object> GetFunctionName(Isolate* isolate);
+ Handle<Object> GetScriptNameOrSourceUrl(Isolate* isolate);
+ // Return 1-based line number, including line offset.
+ int GetLineNumber(Isolate* isolate);
+ // Return 1-based column number, including column offset if first line.
+ int GetColumnNumber(Isolate* isolate);
+ bool IsNative(Isolate* isolate);
+ bool IsToplevel(Isolate* isolate);
+ bool IsEval(Isolate* isolate);
+
+ private:
+ Handle<Object> receiver_;
+ Handle<JSFunction> fun_;
+ int pos_;
+};
+
+
#define MESSAGE_TEMPLATES(T) \
/* Error */ \
T(CyclicProto, "Cyclic __proto__ value") \
« no previous file with comments | « no previous file | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698