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

Side by Side Diff: src/messages.cc

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 | « src/messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #include "src/messages.h" 5 #include "src/messages.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/string-builder.h" 10 #include "src/string-builder.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 MessageLocation::MessageLocation(Handle<Script> script, int start_pos,
16 int end_pos)
17 : script_(script), start_pos_(start_pos), end_pos_(end_pos) {}
18 MessageLocation::MessageLocation(Handle<Script> script, int start_pos,
19 int end_pos, Handle<JSFunction> function)
20 : script_(script),
21 start_pos_(start_pos),
22 end_pos_(end_pos),
23 function_(function) {}
24 MessageLocation::MessageLocation() : start_pos_(-1), end_pos_(-1) {}
15 25
16 // If no message listeners have been registered this one is called 26 // If no message listeners have been registered this one is called
17 // by default. 27 // by default.
18 void MessageHandler::DefaultMessageReport(Isolate* isolate, 28 void MessageHandler::DefaultMessageReport(Isolate* isolate,
19 const MessageLocation* loc, 29 const MessageLocation* loc,
20 Handle<Object> message_obj) { 30 Handle<Object> message_obj) {
21 base::SmartArrayPointer<char> str = GetLocalizedMessage(isolate, message_obj); 31 base::SmartArrayPointer<char> str = GetLocalizedMessage(isolate, message_obj);
22 if (loc == NULL) { 32 if (loc == NULL) {
23 PrintF("%s\n", str.get()); 33 PrintF("%s\n", str.get());
24 } else { 34 } else {
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 builder.AppendCharacter(*c); 421 builder.AppendCharacter(*c);
412 } 422 }
413 } 423 }
414 424
415 return builder.Finish(); 425 return builder.Finish();
416 } 426 }
417 427
418 428
419 } // namespace internal 429 } // namespace internal
420 } // namespace v8 430 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698