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

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

Issue 2845053003: Fix asserts in StackFrameIterator which were effectively disabled (Closed)
Patch Set: Add StackFrameIterator::{ValidationPolicy,CrossThreadPolicy} enums Created 3 years, 7 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/isolate_reload.cc ('k') | runtime/vm/os.h » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/native_entry.h" 5 #include "vm/native_entry.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 NativeFunction target_function = NULL; 258 NativeFunction target_function = NULL;
259 bool is_bootstrap_native = false; 259 bool is_bootstrap_native = false;
260 bool is_auto_scope = true; 260 bool is_auto_scope = true;
261 261
262 { 262 {
263 TransitionGeneratedToVM transition(arguments->thread()); 263 TransitionGeneratedToVM transition(arguments->thread());
264 StackZone stack_zone(arguments->thread()); 264 StackZone stack_zone(arguments->thread());
265 Zone* zone = stack_zone.GetZone(); 265 Zone* zone = stack_zone.GetZone();
266 266
267 DartFrameIterator iterator; 267 DartFrameIterator iterator(arguments->thread(),
268 StackFrameIterator::kNoCrossThreadIteration);
268 StackFrame* caller_frame = iterator.NextFrame(); 269 StackFrame* caller_frame = iterator.NextFrame();
269 270
270 const Code& code = Code::Handle(zone, caller_frame->LookupDartCode()); 271 const Code& code = Code::Handle(zone, caller_frame->LookupDartCode());
271 const Function& func = Function::Handle(zone, code.function()); 272 const Function& func = Function::Handle(zone, code.function());
272 273
273 if (FLAG_trace_natives) { 274 if (FLAG_trace_natives) {
274 THR_Print("Resolving native target for %s\n", func.ToCString()); 275 THR_Print("Resolving native target for %s\n", func.ToCString());
275 } 276 }
276 277
277 target_function = 278 target_function =
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // Because this call is within a compilation unit, Clang doesn't respect 339 // Because this call is within a compilation unit, Clang doesn't respect
339 // the ABI alignment here. 340 // the ABI alignment here.
340 NativeEntry::NoScopeNativeCallWrapperNoStackCheck( 341 NativeEntry::NoScopeNativeCallWrapperNoStackCheck(
341 args, reinterpret_cast<Dart_NativeFunction>(target_function)); 342 args, reinterpret_cast<Dart_NativeFunction>(target_function));
342 } 343 }
343 } 344 }
344 #endif // !defined(TARGET_ARCH_DBC) 345 #endif // !defined(TARGET_ARCH_DBC)
345 346
346 347
347 } // namespace dart 348 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | runtime/vm/os.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698