Home | History | Annotate | Download | only in cctest

Lines Matching refs:env2

5213   v8::Persistent<Context> env2 = Context::New();
5231 // Switch to env2 in the same domain and invoke spy on env2.
5233 env2->SetSecurityToken(foo);
5234 // Enter env2
5235 Context::Scope scope_env2(env2);
5236 Local<Value> result = Function::Cast(*spy)->Call(env2->Global(), 0, NULL);
5241 env2->SetSecurityToken(bar);
5242 Context::Scope scope_env2(env2);
5246 Function::Cast(*spy2)->Call(env2->Global(), 0, NULL);
5250 env2.Dispose();
5326 v8::Persistent<Context> env2 = Context::New();
5333 env2->SetSecurityToken(foo);
5336 env2->Global()->Set(v8_str("env1"), env1->Global());
5338 // Change env2 to a different domain and delete env1.prop.
5339 env2->SetSecurityToken(bar);
5341 Context::Scope scope_env2(env2);
5352 env2.Dispose();
5359 v8::Persistent<Context> env2 = Context::New();
5366 env2->SetSecurityToken(foo);
5369 env2->Global()->Set(v8_str("env1"), env1->Global());
5371 // env1.prop is enumerable in env2.
5374 Context::Scope scope_env2(env2);
5379 // Change env2 to a different domain and test again.
5380 env2->SetSecurityToken(bar);
5382 Context::Scope scope_env2(env2);
5387 env2.Dispose();
5394 v8::Persistent<Context> env2 = Context::New();
5401 env2->SetSecurityToken(foo);
5404 env2->Global()->Set(v8_str("env1"), env1->Global());
5406 // Change env2 to a different domain and set env1's global object
5407 // as the __proto__ of an object in env2 and enumerate properties
5410 env2->SetSecurityToken(bar);
5412 Context::Scope scope_env2(env2);
5420 env2.Dispose();
5427 v8::Persistent<Context> env2 = Context::New();
5435 env2->SetSecurityToken(foo);
5437 // Enter env2
5438 env2->Enter();
5440 // Create a function in env2 and add a reference to it in env1.
5441 Local<v8::Object> global2 = env2->Global();
5448 // Detach env2's global, and reuse the global object of env2
5449 env2->Exit();
5450 env2->DetachGlobal();
5451 // env2 has a new global object.
5452 CHECK(!env2->Global()->Equals(global2));
5483 env2.Dispose();
5493 v8::Persistent<Context> env2 = Context::New();
5497 // Set same security token for env1 and env2.
5499 env2->SetSecurityToken(foo);
5501 // Create a property on the global object in env2.
5503 v8::Context::Scope scope(env2);
5504 env2->Global()->Set(v8_str("p"), v8::Integer::New(42));
5507 // Create a reference to env2 global from env1 global.
5508 env1->Global()->Set(v8_str("other"), env2->Global());
5510 // Check that we have access to other.p in env2 from env1.
5515 // Hold on to global from env2 and detach global from env2.
5516 Local<v8::Object> global2 = env2->Global();
5517 env2->DetachGlobal();
5529 // Start by using the same security token for env3 as for env1 and env2.
5543 // Change security token for env3 to something different from env1 and env2.
5552 // Detach the global for env3 and reattach it to env2.
5554 env2->ReattachGlobal(global2);
5557 // the global object for env2 which has the same security token as env1.
5562 env2.Dispose();