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

Side by Side Diff: src/messages.h

Issue 1872373002: Move MessageLocations constructor out of header (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@show-wasm-frames-4
Patch Set: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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_
11 #define V8_MESSAGES_H_ 11 #define V8_MESSAGES_H_
12 12
13 #include "src/base/smart-pointers.h" 13 #include "src/base/smart-pointers.h"
14 #include "src/handles.h" 14 #include "src/handles.h"
15 #include "src/list.h" 15 #include "src/list.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 19
20 // Forward declarations. 20 // Forward declarations.
21 class JSMessageObject; 21 class JSMessageObject;
22 class LookupIterator; 22 class LookupIterator;
23 class SourceInfo; 23 class SourceInfo;
24 24
25 class MessageLocation { 25 class MessageLocation {
26 public: 26 public:
27 MessageLocation(Handle<Script> script, int start_pos, int end_pos);
27 MessageLocation(Handle<Script> script, int start_pos, int end_pos, 28 MessageLocation(Handle<Script> script, int start_pos, int end_pos,
28 Handle<JSFunction> function = Handle<JSFunction>()) 29 Handle<JSFunction> function);
29 : script_(script), 30 MessageLocation();
30 start_pos_(start_pos),
31 end_pos_(end_pos),
32 function_(function) {}
33 MessageLocation() : start_pos_(-1), end_pos_(-1) { }
34 31
35 Handle<Script> script() const { return script_; } 32 Handle<Script> script() const { return script_; }
36 int start_pos() const { return start_pos_; } 33 int start_pos() const { return start_pos_; }
37 int end_pos() const { return end_pos_; } 34 int end_pos() const { return end_pos_; }
38 Handle<JSFunction> function() const { return function_; } 35 Handle<JSFunction> function() const { return function_; }
39 36
40 private: 37 private:
41 Handle<Script> script_; 38 Handle<Script> script_;
42 int start_pos_; 39 int start_pos_;
43 int end_pos_; 40 int end_pos_;
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); 513 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data);
517 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, 514 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate,
518 Handle<Object> data); 515 Handle<Object> data);
519 }; 516 };
520 517
521 518
522 } // namespace internal 519 } // namespace internal
523 } // namespace v8 520 } // namespace v8
524 521
525 #endif // V8_MESSAGES_H_ 522 #endif // V8_MESSAGES_H_
OLDNEW
« 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