Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index de00fbba4635a2543775d74ba5e3efa5d8367a43..90f499674299768599b7986e8674a487fe54c10f 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -2383,6 +2383,10 @@ TEST(APIThrowMessageOverwrittenToString) { |
CompileRun("asdf;"); |
CompileRun("ReferenceError.prototype.constructor = void 0;"); |
CompileRun("asdf;"); |
+ CompileRun("ReferenceError.prototype.__proto__ = new Object();"); |
+ CompileRun("asdf;"); |
+ CompileRun("ReferenceError.prototype = new Object();"); |
+ CompileRun("asdf;"); |
v8::Handle<Value> string = CompileRun("try { asdf; } catch(e) { e + ''; }"); |
CHECK(string->Equals(v8_str("Whoops"))); |
v8::V8::RemoveMessageListeners(check_message); |