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

Unified Diff: runtime/vm/dart_api_impl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index c79748fd26ec2529760ab9b907327fa8907161fc..d425fe1d175c869e855909e3300d2e24c4ee154e 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -853,7 +853,7 @@ DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle) {
CURRENT_FUNC);
}
}
- if (isolate->top_exit_frame_info() == 0) {
+ if (thread->top_exit_frame_info() == 0) {
// There are no dart frames on the stack so it would be illegal to
// propagate an error here.
return Api::NewError("No Dart frames on stack, cannot propagate error.");
@@ -870,7 +870,7 @@ DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle) {
// handle for it in the surviving zone.
NoSafepointScope no_safepoint;
RawError* raw_error = Api::UnwrapErrorHandle(thread->zone(), handle).raw();
- state->UnwindScopes(isolate->top_exit_frame_info());
+ state->UnwindScopes(thread->top_exit_frame_info());
// Note that thread's zone is different here than at the beginning of this
// function.
error = &Error::Handle(thread->zone(), raw_error);
@@ -2884,7 +2884,7 @@ static RawObject* ThrowArgumentError(const char* exception_message) {
if (result.IsError()) return result.raw();
ASSERT(result.IsNull());
- if (isolate->top_exit_frame_info() == 0) {
+ if (thread->top_exit_frame_info() == 0) {
// There are no dart frames on the stack so it would be illegal to
// throw an exception here.
const String& message = String::Handle(
@@ -2899,7 +2899,7 @@ static RawObject* ThrowArgumentError(const char* exception_message) {
{
NoSafepointScope no_safepoint;
RawInstance* raw_exception = exception.raw();
- state->UnwindScopes(isolate->top_exit_frame_info());
+ state->UnwindScopes(thread->top_exit_frame_info());
saved_exception = &Instance::Handle(raw_exception);
}
Exceptions::Throw(thread, *saved_exception);
@@ -4520,7 +4520,7 @@ DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception) {
RETURN_TYPE_ERROR(zone, exception, Instance);
}
}
- if (isolate->top_exit_frame_info() == 0) {
+ if (thread->top_exit_frame_info() == 0) {
// There are no dart frames on the stack so it would be illegal to
// throw an exception here.
return Api::NewError("No Dart frames on stack, cannot throw exception");
@@ -4535,7 +4535,7 @@ DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception) {
NoSafepointScope no_safepoint;
RawInstance* raw_exception =
Api::UnwrapInstanceHandle(zone, exception).raw();
- state->UnwindScopes(isolate->top_exit_frame_info());
+ state->UnwindScopes(thread->top_exit_frame_info());
saved_exception = &Instance::Handle(raw_exception);
}
Exceptions::Throw(thread, *saved_exception);
@@ -4560,7 +4560,7 @@ DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception,
RETURN_TYPE_ERROR(zone, stacktrace, Instance);
}
}
- if (isolate->top_exit_frame_info() == 0) {
+ if (thread->top_exit_frame_info() == 0) {
// There are no dart frames on the stack so it would be illegal to
// throw an exception here.
return Api::NewError("No Dart frames on stack, cannot throw exception");
@@ -4578,7 +4578,7 @@ DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception,
Api::UnwrapInstanceHandle(zone, exception).raw();
RawStacktrace* raw_stacktrace =
Api::UnwrapStacktraceHandle(zone, stacktrace).raw();
- state->UnwindScopes(isolate->top_exit_frame_info());
+ state->UnwindScopes(thread->top_exit_frame_info());
saved_exception = &Instance::Handle(raw_exception);
saved_stacktrace = &Stacktrace::Handle(raw_stacktrace);
}
@@ -4968,7 +4968,7 @@ DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args,
// --- Environment ---
RawString* Api::CallEnvironmentCallback(Thread* thread, const String& name) {
Isolate* isolate = thread->isolate();
- Scope api_scope(isolate);
+ Scope api_scope(thread);
Dart_EnvironmentCallback callback = isolate->environment_callback();
String& result = String::Handle(thread->zone());
if (callback != NULL) {
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698