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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 908433002: - Make sure to fail early if an non-stacktrace is passed into the VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 43542)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -761,7 +761,7 @@
if (obj.IsNull()) {
RETURN_TYPE_ERROR(isolate, exception, Instance);
}
- const Instance& stacktrace = Instance::Handle(isolate);
+ const Stacktrace& stacktrace = Stacktrace::Handle(isolate);
return Api::NewHandle(isolate, UnhandledException::New(obj, stacktrace));
}
@@ -4373,16 +4373,16 @@
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
const Instance* saved_exception;
- const Instance* saved_stacktrace;
+ const Stacktrace* saved_stacktrace;
{
NoGCScope no_gc;
RawInstance* raw_exception =
Api::UnwrapInstanceHandle(isolate, exception).raw();
- RawInstance* raw_stacktrace =
- Api::UnwrapInstanceHandle(isolate, stacktrace).raw();
+ RawStacktrace* raw_stacktrace =
+ Api::UnwrapStacktraceHandle(isolate, stacktrace).raw();
state->UnwindScopes(isolate->top_exit_frame_info());
saved_exception = &Instance::Handle(raw_exception);
- saved_stacktrace = &Instance::Handle(raw_stacktrace);
+ saved_stacktrace = &Stacktrace::Handle(raw_stacktrace);
}
Exceptions::ReThrow(isolate, *saved_exception, *saved_stacktrace);
return Api::NewError("Exception was not re thrown, internal error");
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698