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

Unified Diff: runtime/vm/exceptions.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/exceptions.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
===================================================================
--- runtime/vm/exceptions.cc (revision 43542)
+++ runtime/vm/exceptions.cc (working copy)
@@ -361,7 +361,7 @@
static void ThrowExceptionHelper(Isolate* isolate,
const Instance& incoming_exception,
- const Instance& existing_stacktrace,
+ const Stacktrace& existing_stacktrace,
const bool is_rethrow) {
bool use_preallocated_stacktrace = false;
Instance& exception = Instance::Handle(isolate, incoming_exception.raw());
@@ -426,7 +426,7 @@
stacktrace = Stacktrace::New(code_array, pc_offset_array);
} else {
ASSERT(is_rethrow);
- stacktrace ^= existing_stacktrace.raw();
+ stacktrace = existing_stacktrace.raw();
if (pc_offset_array.Length() != 0) {
// Skip the first frame during a rethrow. This is the catch clause
// with the rethrow statement, which is not part of the original
@@ -573,13 +573,13 @@
isolate->debugger()->SignalExceptionThrown(exception);
}
// Null object is a valid exception object.
- ThrowExceptionHelper(isolate, exception, Instance::Handle(isolate), false);
+ ThrowExceptionHelper(isolate, exception, Stacktrace::Handle(isolate), false);
}
void Exceptions::ReThrow(Isolate* isolate,
const Instance& exception,
- const Instance& stacktrace) {
+ const Stacktrace& stacktrace) {
// Null object is a valid exception object.
ThrowExceptionHelper(isolate, exception, stacktrace, true);
}
@@ -593,7 +593,7 @@
// rethrow the exception in the normal fashion.
const UnhandledException& uhe = UnhandledException::Cast(error);
const Instance& exc = Instance::Handle(isolate, uhe.exception());
- const Instance& stk = Instance::Handle(isolate, uhe.stacktrace());
+ const Stacktrace& stk = Stacktrace::Handle(isolate, uhe.stacktrace());
Exceptions::ReThrow(isolate, exc, stk);
} else {
// Return to the invocation stub and return this error object. The
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698