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

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

Issue 1672853002: Move sticky_error_ from isolate to thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments addressed Created 4 years, 10 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/message_handler.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 44
45 void LongJumpScope::Jump(int value, const Error& error) { 45 void LongJumpScope::Jump(int value, const Error& error) {
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();
53 52
54 #if defined(DEBUG) 53 #if defined(DEBUG)
55 #define CHECK_REUSABLE_HANDLE(name) \ 54 #define CHECK_REUSABLE_HANDLE(name) \
56 ASSERT(!thread->reusable_##name##_handle_scope_active()); 55 ASSERT(!thread->reusable_##name##_handle_scope_active());
57 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE) 56 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE)
58 #undef CHECK_REUSABLE_HANDLE 57 #undef CHECK_REUSABLE_HANDLE
59 #endif // defined(DEBUG) 58 #endif // defined(DEBUG)
60 59
61 // Remember the error in the sticky error of this isolate. 60 // Remember the error in the sticky error of this isolate.
62 isolate->object_store()->set_sticky_error(error); 61 thread->set_sticky_error(error);
63 62
64 // Destruct all the active StackResource objects. 63 // Destruct all the active StackResource objects.
65 StackResource::UnwindAbove(thread, top_); 64 StackResource::UnwindAbove(thread, top_);
66 longjmp(environment_, value); 65 longjmp(environment_, value);
67 UNREACHABLE(); 66 UNREACHABLE();
68 } 67 }
69 68
70 } // namespace dart 69 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698