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

Side by Side Diff: runtime/vm/report.cc

Issue 1410643008: Get rid of deprecated methods accessing mutator_thread_ instead of current thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « runtime/vm/parser.cc ('k') | runtime/vm/service.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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/report.h" 5 #include "vm/report.h"
6 6
7 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return; 145 return;
146 } 146 }
147 if (!FLAG_warning_as_error) { 147 if (!FLAG_warning_as_error) {
148 const String& msg = String::Handle(String::NewFormattedV(format, args)); 148 const String& msg = String::Handle(String::NewFormattedV(format, args));
149 const String& snippet_msg = String::Handle( 149 const String& snippet_msg = String::Handle(
150 PrependSnippet(kind, script, token_pos, msg)); 150 PrependSnippet(kind, script, token_pos, msg));
151 OS::Print("%s", snippet_msg.ToCString()); 151 OS::Print("%s", snippet_msg.ToCString());
152 if (kind == kJSWarning) { 152 if (kind == kJSWarning) {
153 TraceJSWarning(script, token_pos, msg); 153 TraceJSWarning(script, token_pos, msg);
154 // Do not print stacktrace if we have not executed Dart code yet. 154 // Do not print stacktrace if we have not executed Dart code yet.
155 if (Isolate::Current()->top_exit_frame_info() != 0) { 155 if (Thread::Current()->top_exit_frame_info() != 0) {
156 const Stacktrace& stacktrace = 156 const Stacktrace& stacktrace =
157 Stacktrace::Handle(Exceptions::CurrentStacktrace()); 157 Stacktrace::Handle(Exceptions::CurrentStacktrace());
158 intptr_t idx = 0; 158 intptr_t idx = 0;
159 OS::Print("%s", stacktrace.ToCStringInternal( 159 OS::Print("%s", stacktrace.ToCStringInternal(
160 &idx, FLAG_stacktrace_depth_on_warning)); 160 &idx, FLAG_stacktrace_depth_on_warning));
161 } 161 }
162 } 162 }
163 return; 163 return;
164 } 164 }
165 } 165 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 trace_warning.AddProperty("type", "JSCompatibilityWarning"); 252 trace_warning.AddProperty("type", "JSCompatibilityWarning");
253 trace_warning.AddProperty("script", script); 253 trace_warning.AddProperty("script", script);
254 trace_warning.AddProperty("tokenPos", token_pos); 254 trace_warning.AddProperty("tokenPos", token_pos);
255 trace_warning.AddProperty("message", message); 255 trace_warning.AddProperty("message", message);
256 } 256 }
257 trace_buffer->Trace(micros, js.ToCString(), true); // Already escaped. 257 trace_buffer->Trace(micros, js.ToCString(), true); // Already escaped.
258 } 258 }
259 259
260 } // namespace dart 260 } // namespace dart
261 261
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698