| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 3be500814533e45ee0b6273f45577438fa35019f..b96d950f9bf5435ad0904350e3a01a1dabe6c317 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -9522,6 +9522,26 @@ THREADED_TEST(SetPrototypeThrows) {
|
| }
|
|
|
|
|
| +THREADED_TEST(FunctionRemovePrototype) {
|
| + LocalContext context;
|
| + v8::HandleScope handle_scope(context->GetIsolate());
|
| +
|
| + Local<v8::FunctionTemplate> t1 = v8::FunctionTemplate::New();
|
| + t1->RemovePrototype();
|
| + Local<v8::Function> fun = t1->GetFunction();
|
| + context->Global()->Set(v8_str("fun"), fun);
|
| + CHECK(!CompileRun("'prototype' in fun")->BooleanValue());
|
| +
|
| + v8::TryCatch try_catch;
|
| + CompileRun("new fun()");
|
| + CHECK(try_catch.HasCaught());
|
| +
|
| + try_catch.Reset();
|
| + fun->NewInstance();
|
| + CHECK(try_catch.HasCaught());
|
| +}
|
| +
|
| +
|
| THREADED_TEST(GetterSetterExceptions) {
|
| LocalContext context;
|
| v8::HandleScope handle_scope(context->GetIsolate());
|
|
|