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

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

Issue 118553003: Upgrade Symbol implementation to match current ES6 behavior. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Created 6 years, 12 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
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index eeb786518e8d6ca13cb5b915505017c925d98573..2c4152110a620925a7a2b53ac2c2bbc4bea82ade 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2759,7 +2759,13 @@ THREADED_TEST(SymbolProperties) {
CHECK(sym_obj->IsSymbolObject());
CHECK(!sym2->IsSymbolObject());
CHECK(!obj->IsSymbolObject());
- CHECK(sym_obj->Equals(sym2));
+ // Comparing Symbol wrapper with Symbol will throw when
+ // ToPrimitive() is attempted performed on the wrapper.
+ {
+ v8::TryCatch try_catch;
+ sym_obj->Equals(sym2);
+ CHECK(try_catch.HasCaught());
+ }
CHECK(!sym_obj->StrictEquals(sym2));
CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj));
CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2));
« no previous file with comments | « src/symbol.js ('k') | test/mjsunit/harmony/private.js » ('j') | test/mjsunit/harmony/symbols.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698