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

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

Issue 1394673002: Move reusable handles from isolate to thread. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix release build 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/isolate.cc ('k') | runtime/vm/native_entry.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) 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/longjump.h" 5 #include "vm/longjump.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // A zero is the default return value from setting up a LongJumpScope 46 // A zero is the default return value from setting up a LongJumpScope
47 // using Set. 47 // using Set.
48 ASSERT(value != 0); 48 ASSERT(value != 0);
49 ASSERT(IsSafeToJump()); 49 ASSERT(IsSafeToJump());
50 50
51 Thread* thread = Thread::Current(); 51 Thread* thread = Thread::Current();
52 Isolate* isolate = thread->isolate(); 52 Isolate* isolate = thread->isolate();
53 53
54 #if defined(DEBUG) 54 #if defined(DEBUG)
55 #define CHECK_REUSABLE_HANDLE(name) \ 55 #define CHECK_REUSABLE_HANDLE(name) \
56 ASSERT(!isolate->reusable_##name##_handle_scope_active()); 56 ASSERT(!thread->reusable_##name##_handle_scope_active());
57 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE) 57 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE)
58 #undef CHECK_REUSABLE_HANDLE 58 #undef CHECK_REUSABLE_HANDLE
59 #endif // defined(DEBUG) 59 #endif // defined(DEBUG)
60 60
61 // Remember the error in the sticky error of this isolate. 61 // Remember the error in the sticky error of this isolate.
62 isolate->object_store()->set_sticky_error(error); 62 isolate->object_store()->set_sticky_error(error);
63 63
64 // Destruct all the active StackResource objects. 64 // Destruct all the active StackResource objects.
65 StackResource::UnwindAbove(thread, top_); 65 StackResource::UnwindAbove(thread, top_);
66 longjmp(environment_, value); 66 longjmp(environment_, value);
67 UNREACHABLE(); 67 UNREACHABLE();
68 } 68 }
69 69
70 } // namespace dart 70 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/native_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698