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

Unified Diff: test/cctest/test-api.cc

Issue 1049703002: Make compilers agree on source position of thrown errors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix another regression. Created 5 years, 8 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 | « src/prettyprinter.cc ('k') | test/message/regress/regress-3995.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index e01e8f19a941824b3e4c244c4d7debda3789ef72..f9f723ab3a772ae19a86ae5080365dbe5bc4423d 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5312,8 +5312,7 @@ void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) {
CHECK_EQ(0,
strcmp(*v8::String::Utf8Value(message->Get()), "Uncaught Error: a"));
CHECK_EQ(1, message->GetLineNumber());
- // TODO(3995): Our compilers disagree about the position.
- if (!i::FLAG_always_opt) CHECK_EQ(6, message->GetStartColumn());
+ CHECK_EQ(0, message->GetStartColumn());
}
@@ -9795,11 +9794,7 @@ THREADED_TEST(ConstructorForObject) {
value = CompileRun("new obj2(28)");
CHECK(try_catch.HasCaught());
String::Utf8Value exception_value1(try_catch.Exception());
- // TODO(3995): Our compilers disagree about the position (and message).
- if (!i::FLAG_always_opt) {
- CHECK_EQ(0,
- strcmp("TypeError: obj2 is not a function", *exception_value1));
- }
+ CHECK_EQ(0, strcmp("TypeError: obj2 is not a function", *exception_value1));
try_catch.Reset();
Local<Value> args[] = {v8_num(29)};
@@ -15005,11 +15000,9 @@ void AnalyzeStackInNativeCode(const v8::FunctionCallbackInfo<v8::Value>& args) {
checkStackFrame(origin, "foo", 6, 3, false, false,
stackTrace->GetFrame(1));
// This is the source string inside the eval which has the call to foo.
- checkStackFrame(NULL, "", 1, 5, false, false,
- stackTrace->GetFrame(2));
+ checkStackFrame(NULL, "", 1, 1, false, false, stackTrace->GetFrame(2));
// The last frame is an anonymous function which has the initial eval call.
- checkStackFrame(origin, "", 8, 7, false, false,
- stackTrace->GetFrame(3));
+ checkStackFrame(origin, "", 8, 7, false, false, stackTrace->GetFrame(3));
CHECK(stackTrace->AsArray()->IsArray());
} else if (testGroup == kDetailedTest) {
@@ -15022,11 +15015,9 @@ void AnalyzeStackInNativeCode(const v8::FunctionCallbackInfo<v8::Value>& args) {
stackTrace->GetFrame(1));
bool is_eval = true;
// This is the source string inside the eval which has the call to baz.
- checkStackFrame(NULL, "", 1, 5, is_eval, false,
- stackTrace->GetFrame(2));
+ checkStackFrame(NULL, "", 1, 1, is_eval, false, stackTrace->GetFrame(2));
// The last frame is an anonymous function which has the initial eval call.
- checkStackFrame(origin, "", 10, 1, false, false,
- stackTrace->GetFrame(3));
+ checkStackFrame(origin, "", 10, 1, false, false, stackTrace->GetFrame(3));
CHECK(stackTrace->AsArray()->IsArray());
}
« no previous file with comments | « src/prettyprinter.cc ('k') | test/message/regress/regress-3995.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698