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

Side by Side Diff: src/messages.cc

Issue 2628973005: [runtime] Change MessageLocation::function to SFI. (Closed)
Patch Set: Rebased. Created 3 years, 11 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') | src/runtime/runtime-internal.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 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 <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
11 #include "src/isolate-inl.h" 11 #include "src/isolate-inl.h"
12 #include "src/keys.h" 12 #include "src/keys.h"
13 #include "src/string-builder.h" 13 #include "src/string-builder.h"
14 #include "src/wasm/wasm-module.h" 14 #include "src/wasm/wasm-module.h"
15 #include "src/wasm/wasm-objects.h" 15 #include "src/wasm/wasm-objects.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 19
20 MessageLocation::MessageLocation(Handle<Script> script, int start_pos, 20 MessageLocation::MessageLocation(Handle<Script> script, int start_pos,
21 int end_pos) 21 int end_pos)
22 : script_(script), start_pos_(start_pos), end_pos_(end_pos) {} 22 : script_(script), start_pos_(start_pos), end_pos_(end_pos) {}
23 MessageLocation::MessageLocation(Handle<Script> script, int start_pos, 23 MessageLocation::MessageLocation(Handle<Script> script, int start_pos,
24 int end_pos, Handle<JSFunction> function) 24 int end_pos, Handle<SharedFunctionInfo> shared)
25 : script_(script), 25 : script_(script),
26 start_pos_(start_pos), 26 start_pos_(start_pos),
27 end_pos_(end_pos), 27 end_pos_(end_pos),
28 function_(function) {} 28 shared_(shared) {}
29 MessageLocation::MessageLocation() : start_pos_(-1), end_pos_(-1) {} 29 MessageLocation::MessageLocation() : start_pos_(-1), end_pos_(-1) {}
30 30
31 // If no message listeners have been registered this one is called 31 // If no message listeners have been registered this one is called
32 // by default. 32 // by default.
33 void MessageHandler::DefaultMessageReport(Isolate* isolate, 33 void MessageHandler::DefaultMessageReport(Isolate* isolate,
34 const MessageLocation* loc, 34 const MessageLocation* loc,
35 Handle<Object> message_obj) { 35 Handle<Object> message_obj) {
36 std::unique_ptr<char[]> str = GetLocalizedMessage(isolate, message_obj); 36 std::unique_ptr<char[]> str = GetLocalizedMessage(isolate, message_obj);
37 if (loc == NULL) { 37 if (loc == NULL) {
38 PrintF("%s\n", str.get()); 38 PrintF("%s\n", str.get());
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 DCHECK(mode != SKIP_UNTIL_SEEN); 1230 DCHECK(mode != SKIP_UNTIL_SEEN);
1231 1231
1232 Handle<Object> no_caller; 1232 Handle<Object> no_caller;
1233 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); 1233 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2);
1234 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, 1234 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode,
1235 no_caller, false); 1235 no_caller, false);
1236 } 1236 }
1237 1237
1238 } // namespace internal 1238 } // namespace internal
1239 } // namespace v8 1239 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698