Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index bbf2f98875b417ecf2dcf0f2a605f0c6de26caef..96ee17e964cdb0fda1a01ce5a41d3dd87955e989 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -3325,6 +3325,20 @@ THREADED_TEST(GlobalSymbols) { |
CHECK(!sym2->SameValue(glob_api)); |
} |
+THREADED_TEST(GlobalSymbolsNoContext) { |
+ v8::Isolate* isolate = CcTest::isolate(); |
+ v8::HandleScope scope(isolate); |
+ |
+ v8::Local<String> name = v8_str("my-symbol"); |
+ v8::Local<v8::Symbol> glob = v8::Symbol::For(isolate, name); |
+ v8::Local<v8::Symbol> glob2 = v8::Symbol::For(isolate, name); |
+ CHECK(glob2->SameValue(glob)); |
+ |
+ v8::Local<v8::Symbol> glob_api = v8::Symbol::ForApi(isolate, name); |
+ v8::Local<v8::Symbol> glob_api2 = v8::Symbol::ForApi(isolate, name); |
+ CHECK(glob_api2->SameValue(glob_api)); |
+ CHECK(!glob_api->SameValue(glob)); |
+} |
static void CheckWellKnownSymbol(v8::Local<v8::Symbol>(*getter)(v8::Isolate*), |
const char* name) { |