Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 3d7bddda79679c8f3d5516cc5c56832475050f3a..86dcb9e9546d976e0f1f6efed54bbe4a5dc7edd7 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -25026,3 +25026,12 @@ TEST(SetIntegrityLevel) { |
is_frozen = CompileRun("Object.isFrozen(o)"); |
CHECK(is_frozen->BooleanValue(context.local()).FromJust()); |
} |
+ |
+TEST(PrivateForApiIsNumber) { |
+ LocalContext context; |
+ v8::Isolate* isolate = CcTest::isolate(); |
+ v8::HandleScope scope(isolate); |
+ |
+ // Shouldn't crash. |
+ v8::Private::ForApi(isolate, v8_str("42")); |
+} |