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

Side by Side Diff: src/messages.h

Issue 2164903004: Eagerly format traces in captureStackTrace (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « src/isolate.cc ('k') | src/messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 private: 65 private:
66 Isolate* isolate_; 66 Isolate* isolate_;
67 Handle<Object> receiver_; 67 Handle<Object> receiver_;
68 Handle<JSFunction> fun_; 68 Handle<JSFunction> fun_;
69 int32_t pos_ = -1; 69 int32_t pos_ = -1;
70 Handle<JSObject> wasm_obj_; 70 Handle<JSObject> wasm_obj_;
71 uint32_t wasm_func_index_ = static_cast<uint32_t>(-1); 71 uint32_t wasm_func_index_ = static_cast<uint32_t>(-1);
72 }; 72 };
73 73
74 // Formats a textual stack trace from the given structured stack trace.
75 // Note that this can call arbitrary JS code through Error.prepareStackTrace.
76 MaybeHandle<Object> FormatStackTrace(Isolate* isolate, Handle<JSObject> error,
77 Handle<Object> stack_trace);
78
74 // Determines how stack trace collection skips frames. 79 // Determines how stack trace collection skips frames.
75 enum FrameSkipMode { 80 enum FrameSkipMode {
76 // Unconditionally skips the first frame. Used e.g. when the Error constructor 81 // Unconditionally skips the first frame. Used e.g. when the Error constructor
77 // is called, in which case the first frame is always a BUILTIN_EXIT frame. 82 // is called, in which case the first frame is always a BUILTIN_EXIT frame.
78 SKIP_FIRST, 83 SKIP_FIRST,
79 // Skip all frames until a specified caller function is seen. 84 // Skip all frames until a specified caller function is seen.
80 SKIP_UNTIL_SEEN, 85 SKIP_UNTIL_SEEN,
81 SKIP_NONE, 86 SKIP_NONE,
82 }; 87 };
83 88
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 555 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
551 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, 556 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate,
552 Handle<Object> data); 557 Handle<Object> data);
553 }; 558 };
554 559
555 560
556 } // namespace internal 561 } // namespace internal
557 } // namespace v8 562 } // namespace v8
558 563
559 #endif // V8_MESSAGES_H_ 564 #endif // V8_MESSAGES_H_
OLDNEW
« 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