| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 5d3be5c73ae76812d3e86326b0193cb689ae5699..19a801e3f73104e4c47f13af9524a0b3b2d41fe5 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -20251,6 +20251,26 @@ class RequestMultipleInterrupts : public RequestInterruptTestBase {
|
| TEST(RequestMultipleInterrupts) { RequestMultipleInterrupts().RunTest(); }
|
|
|
|
|
| +static bool interrupt_was_called = false;
|
| +
|
| +
|
| +void SmallScriptsInterruptCallback(v8::Isolate* isolate, void* data) {
|
| + interrupt_was_called = true;
|
| +}
|
| +
|
| +
|
| +TEST(RequestInterruptSmallScripts) {
|
| + LocalContext env;
|
| + v8::Isolate* isolate = CcTest::isolate();
|
| + v8::HandleScope scope(isolate);
|
| +
|
| + interrupt_was_called = false;
|
| + isolate->RequestInterrupt(&SmallScriptsInterruptCallback, NULL);
|
| + CompileRun("(function(x){return x;})(1);");
|
| + CHECK(interrupt_was_called);
|
| +}
|
| +
|
| +
|
| static Local<Value> function_new_expected_env;
|
| static void FunctionNewCallback(const v8::FunctionCallbackInfo<Value>& info) {
|
| CHECK(function_new_expected_env->Equals(info.Data()));
|
|
|