Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: test/cctest/test-object-observe.cc

Issue 264793015: Fix ObjectNotifierPerformChange leak after r21126 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tighten acceptList argument type requirements, remove fuzz-natives blacklist Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/fuzz-natives-part2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/fuzz-natives-part2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698