Index: test/cctest/test-object-observe.cc |
diff --git a/test/cctest/test-object-observe.cc b/test/cctest/test-object-observe.cc |
index 3e9dcd7711847a805adf4b9b095251edb7bd6b5f..a7b346fc6fea07da5cf3d0ff78b05d42698eead6 100644 |
--- a/test/cctest/test-object-observe.cc |
+++ b/test/cctest/test-object-observe.cc |
@@ -692,14 +692,19 @@ TEST(DontLeakContextOnNotifierPerformChange) { |
context->SetSecurityToken(foo); |
CompileRun("var obj = {};"); |
Handle<Value> object = CompileRun("obj"); |
+ Handle<Value> notifier = CompileRun("Object.getNotifier(obj)"); |
{ |
HandleScope scope(CcTest::isolate()); |
LocalContext context2(CcTest::isolate()); |
context2->SetSecurityToken(foo); |
context2->Global()->Set(String::NewFromUtf8(CcTest::isolate(), "obj"), |
object); |
- CompileRun("var n = Object.getNotifier(obj);" |
- "n.performChange('foo', function() {});"); |
+ context2->Global()->Set(String::NewFromUtf8(CcTest::isolate(), "notifier"), |
+ notifier); |
+ CompileRun("var obj2 = {};" |
+ "var notifier2 = Object.getNotifier(obj2);" |
+ "notifier2.performChange.call(" |
+ "notifier, 'foo', function(){})"); |
} |
v8::V8::ContextDisposedNotification(); |