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

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

Issue 1525703003: Revert of [stubs] Fix TypeOfStub to properly return "undefined" for undetectable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/code-stubs-hydrogen.cc ('k') | no next file » | 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 15cb651909b925663ede878e940e73775e298816..fba07af8659806631fcf72a5ec218058fb0554b3 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -11651,54 +11651,6 @@
CHECK(instance->IsCallable());
CHECK(!try_catch.HasCaught());
}
-}
-
-
-THREADED_TEST(Regress567998) {
- LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
-
- Local<v8::FunctionTemplate> desc =
- v8::FunctionTemplate::New(env->GetIsolate());
- desc->InstanceTemplate()->MarkAsUndetectable(); // undetectable
- desc->InstanceTemplate()->SetCallAsFunctionHandler(ReturnThis); // callable
-
- Local<v8::Object> obj = desc->GetFunction(env.local())
- .ToLocalChecked()
- ->NewInstance(env.local())
- .ToLocalChecked();
- CHECK(
- env->Global()->Set(env.local(), v8_str("undetectable"), obj).FromJust());
-
- ExpectString("undetectable.toString()", "[object Object]");
- ExpectString("typeof undetectable", "undefined");
- ExpectString("typeof(undetectable)", "undefined");
- ExpectBoolean("typeof undetectable == 'undefined'", true);
- ExpectBoolean("typeof undetectable == 'object'", false);
- ExpectBoolean("if (undetectable) { true; } else { false; }", false);
- ExpectBoolean("!undetectable", true);
-
- ExpectObject("true&&undetectable", obj);
- ExpectBoolean("false&&undetectable", false);
- ExpectBoolean("true||undetectable", true);
- ExpectObject("false||undetectable", obj);
-
- ExpectObject("undetectable&&true", obj);
- ExpectObject("undetectable&&false", obj);
- ExpectBoolean("undetectable||true", true);
- ExpectBoolean("undetectable||false", false);
-
- ExpectBoolean("undetectable==null", true);
- ExpectBoolean("null==undetectable", true);
- ExpectBoolean("undetectable==undefined", true);
- ExpectBoolean("undefined==undetectable", true);
- ExpectBoolean("undetectable==undetectable", true);
-
- ExpectBoolean("undetectable===null", false);
- ExpectBoolean("null===undetectable", false);
- ExpectBoolean("undetectable===undefined", false);
- ExpectBoolean("undefined===undetectable", false);
- ExpectBoolean("undetectable===undetectable", true);
}
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698