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

Unified Diff: runtime/vm/unit_test.cc

Issue 9314053: Revert Dart_PropagateError until I can track down the problems in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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/unit_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.cc
===================================================================
--- runtime/vm/unit_test.cc (revision 3821)
+++ runtime/vm/unit_test.cc (working copy)
@@ -186,18 +186,38 @@
bool CompilerTest::TestCompileScript(const Library& library,
const Script& script) {
+ bool retval;
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL);
- const Error& error = Error::Handle(Compiler::Compile(library, script));
- return error.IsNull();
+ LongJump* base = isolate->long_jump_base();
+ LongJump jump;
+ isolate->set_long_jump_base(&jump);
+ if (setjmp(*jump.Set()) == 0) {
+ Compiler::Compile(library, script);
+ retval = true;
+ } else {
+ retval = false;
+ }
+ isolate->set_long_jump_base(base);
+ return retval;
}
bool CompilerTest::TestCompileFunction(const Function& function) {
+ bool retval;
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL);
- const Error& error = Error::Handle(Compiler::CompileFunction(function));
- return error.IsNull();
+ LongJump* base = isolate->long_jump_base();
+ LongJump jump;
+ isolate->set_long_jump_base(&jump);
+ if (setjmp(*jump.Set()) == 0) {
+ Compiler::CompileFunction(function);
+ retval = true;
+ } else {
+ retval = false;
+ }
+ isolate->set_long_jump_base(base);
+ return retval;
}
} // namespace dart
« no previous file with comments | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698