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

Unified Diff: src/messages.h

Issue 2252783007: Revert of Use a custom Struct for stack trace storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/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 107290ceeab3ef17e1114f67ae89d3fe0b3f5c53..6aa51dc9010c04e22c38d46dd43c42c7e62a9415 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -40,6 +40,40 @@
int start_pos_;
int end_pos_;
Handle<JSFunction> function_;
+};
+
+
+class CallSite {
+ public:
+ CallSite(Isolate* isolate, Handle<JSObject> call_site_obj);
+
+ Handle<Object> GetFileName();
+ Handle<Object> GetFunctionName();
+ Handle<Object> GetScriptNameOrSourceUrl();
+ Handle<Object> GetMethodName();
+ Handle<Object> GetTypeName();
+ Handle<Object> GetEvalOrigin();
+ // Return 1-based line number, including line offset.
+ int GetLineNumber();
+ // Return 1-based column number, including column offset if first line.
+ int GetColumnNumber();
+ bool IsNative();
+ bool IsToplevel();
+ bool IsEval();
+ bool IsConstructor();
+
+ bool IsJavaScript() { return !fun_.is_null(); }
+ bool IsWasm() { return !wasm_obj_.is_null(); }
+
+ int wasm_func_index() const { return wasm_func_index_; }
+
+ private:
+ Isolate* isolate_;
+ Handle<Object> receiver_;
+ Handle<JSFunction> fun_;
+ int32_t pos_ = -1;
+ Handle<JSObject> wasm_obj_;
+ uint32_t wasm_func_index_ = static_cast<uint32_t>(-1);
};
// Determines how stack trace collection skips frames.
@@ -71,6 +105,16 @@
static MaybeHandle<Object> FormatStackTrace(Isolate* isolate,
Handle<JSObject> error,
Handle<Object> stack_trace);
+};
+
+class CallSiteUtils : public AllStatic {
+ public:
+ static MaybeHandle<Object> Construct(Isolate* isolate,
+ Handle<Object> receiver,
+ Handle<Object> fun, Handle<Object> pos,
+ Handle<Object> strict_mode);
+
+ static MaybeHandle<String> ToString(Isolate* isolate, Handle<Object> recv);
};
#define MESSAGE_TEMPLATES(T) \
« no previous file with comments | « src/isolate.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698