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

Side by Side Diff: src/messages.h

Issue 2191293002: Move FormatStackTrace to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove unneeded code from messages.js 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 unified diff | Download patch
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The infrastructure used for (localized) message reporting in V8. 5 // The infrastructure used for (localized) message reporting in V8.
6 // 6 //
7 // Note: there's a big unresolved issue about ownership of the data 7 // Note: there's a big unresolved issue about ownership of the data
8 // structures used by this framework. 8 // structures used by this framework.
9 9
10 #ifndef V8_MESSAGES_H_ 10 #ifndef V8_MESSAGES_H_
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 45
46 class CallSite { 46 class CallSite {
47 public: 47 public:
48 CallSite(Isolate* isolate, Handle<JSObject> call_site_obj); 48 CallSite(Isolate* isolate, Handle<JSObject> call_site_obj);
49 49
50 Handle<Object> GetFileName(); 50 Handle<Object> GetFileName();
51 Handle<Object> GetFunctionName(); 51 Handle<Object> GetFunctionName();
52 Handle<Object> GetScriptNameOrSourceUrl(); 52 Handle<Object> GetScriptNameOrSourceUrl();
53 Handle<Object> GetMethodName(); 53 Handle<Object> GetMethodName();
54 Handle<Object> GetTypeName();
55 Handle<Object> GetEvalOrigin();
54 // Return 1-based line number, including line offset. 56 // Return 1-based line number, including line offset.
55 int GetLineNumber(); 57 int GetLineNumber();
56 // Return 1-based column number, including column offset if first line. 58 // Return 1-based column number, including column offset if first line.
57 int GetColumnNumber(); 59 int GetColumnNumber();
58 bool IsNative(); 60 bool IsNative();
59 bool IsToplevel(); 61 bool IsToplevel();
60 bool IsEval(); 62 bool IsEval();
61 bool IsConstructor(); 63 bool IsConstructor();
62 64
63 bool IsJavaScript() { return !fun_.is_null(); } 65 bool IsJavaScript() { return !fun_.is_null(); }
(...skipping 23 matching lines...) Expand all
87 // Skip all frames until a specified caller function is seen. 89 // Skip all frames until a specified caller function is seen.
88 SKIP_UNTIL_SEEN, 90 SKIP_UNTIL_SEEN,
89 SKIP_NONE, 91 SKIP_NONE,
90 }; 92 };
91 93
92 MaybeHandle<Object> ConstructError(Isolate* isolate, Handle<JSFunction> target, 94 MaybeHandle<Object> ConstructError(Isolate* isolate, Handle<JSFunction> target,
93 Handle<Object> new_target, 95 Handle<Object> new_target,
94 Handle<Object> message, FrameSkipMode mode, 96 Handle<Object> message, FrameSkipMode mode,
95 bool suppress_detailed_trace); 97 bool suppress_detailed_trace);
96 98
99 MaybeHandle<String> ErrorToString(Isolate* isolate, Handle<Object> recv);
100
101 MaybeHandle<Object> ConstructCallSite(Isolate* isolate,
Yang 2016/08/01 06:49:18 Can we make this a static method of the CallSite c
jgruber 2016/08/01 10:52:56 Moved to all-static ErrorUtils class as discussed.
102 Handle<JSFunction> target,
103 Handle<Object> new_target,
104 Handle<Object> receiver,
105 Handle<Object> fun, Handle<Object> pos,
106 Handle<Object> strict_mode);
107
108 MaybeHandle<String> CallSiteToString(Isolate* isolate, Handle<Object> recv);
Yang 2016/08/01 06:49:18 same here.
jgruber 2016/08/01 10:52:56 Ditto.
109
97 #define MESSAGE_TEMPLATES(T) \ 110 #define MESSAGE_TEMPLATES(T) \
98 /* Error */ \ 111 /* Error */ \
99 T(None, "") \ 112 T(None, "") \
100 T(CyclicProto, "Cyclic __proto__ value") \ 113 T(CyclicProto, "Cyclic __proto__ value") \
101 T(Debugger, "Debugger: %") \ 114 T(Debugger, "Debugger: %") \
102 T(DebuggerLoading, "Error loading debugger") \ 115 T(DebuggerLoading, "Error loading debugger") \
103 T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \ 116 T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \
104 T(UncaughtException, "Uncaught %") \ 117 T(UncaughtException, "Uncaught %") \
105 T(Unsupported, "Not supported") \ 118 T(Unsupported, "Not supported") \
106 T(WrongServiceType, "Internal error, wrong service type: %") \ 119 T(WrongServiceType, "Internal error, wrong service type: %") \
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 571 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
559 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, 572 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate,
560 Handle<Object> data); 573 Handle<Object> data);
561 }; 574 };
562 575
563 576
564 } // namespace internal 577 } // namespace internal
565 } // namespace v8 578 } // namespace v8
566 579
567 #endif // V8_MESSAGES_H_ 580 #endif // V8_MESSAGES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698