Commit addca707 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Remove stale TODO from FunctionTester.

R=titzer@chromium.org
TEST=cctest/test-run-jsexceptions

Review URL: https://codereview.chromium.org/1022463003

Cr-Commit-Position: refs/heads/master@{#27300}
parent e396f538
......@@ -61,7 +61,6 @@ class FunctionTester : public InitializedHandleScope {
CHECK(isolate->has_pending_exception());
CHECK(try_catch.HasCaught());
CHECK(no_result.is_null());
// TODO(mstarzinger): Temporary workaround for issue chromium:362388.
isolate->OptionalRescheduleException(true);
}
......@@ -72,10 +71,8 @@ class FunctionTester : public InitializedHandleScope {
CHECK(isolate->has_pending_exception());
CHECK(try_catch.HasCaught());
CHECK(no_result.is_null());
// TODO(mstarzinger): Calling OptionalRescheduleException is a dirty hack,
// it's the only way to make Message() not to assert because an external
// exception has been caught by the try_catch.
isolate->OptionalRescheduleException(true);
CHECK(!try_catch.Message().IsEmpty());
return try_catch.Message();
}
......
......@@ -31,17 +31,14 @@ TEST(ThrowMessagePosition) {
v8::Handle<v8::Message> message;
message = T.CheckThrowsReturnMessage(T.Val(1), T.undefined());
CHECK(!message.IsEmpty());
CHECK_EQ(2, message->GetLineNumber());
CHECK_EQ(40, message->GetStartPosition());
message = T.CheckThrowsReturnMessage(T.Val(2), T.undefined());
CHECK(!message.IsEmpty());
CHECK_EQ(3, message->GetLineNumber());
CHECK_EQ(67, message->GetStartPosition());
message = T.CheckThrowsReturnMessage(T.Val(3), T.undefined());
CHECK(!message.IsEmpty());
CHECK_EQ(4, message->GetLineNumber());
CHECK_EQ(95, message->GetStartPosition());
}
......@@ -57,11 +54,9 @@ TEST(ThrowMessageDirectly) {
v8::Handle<v8::Message> message;
message = T.CheckThrowsReturnMessage(T.false_value(), T.Val("Wat?"));
CHECK(!message.IsEmpty());
CHECK(message->Get()->Equals(v8_str("Uncaught Error: Wat?")));
message = T.CheckThrowsReturnMessage(T.true_value(), T.Val("Kaboom!"));
CHECK(!message.IsEmpty());
CHECK(message->Get()->Equals(v8_str("Uncaught Kaboom!")));
}
......@@ -80,11 +75,9 @@ TEST(ThrowMessageIndirectly) {
v8::Handle<v8::Message> message;
message = T.CheckThrowsReturnMessage(T.false_value(), T.Val("Wat?"));
CHECK(!message.IsEmpty());
CHECK(message->Get()->Equals(v8_str("Uncaught Error: Wat?")));
message = T.CheckThrowsReturnMessage(T.true_value(), T.Val("Kaboom!"));
CHECK(!message.IsEmpty());
CHECK(message->Get()->Equals(v8_str("Uncaught Kaboom!")));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment