Home | History | Annotate | Download | only in cctest

Lines Matching refs:context

45 // A DeclarationContext holds a reference to a v8::Context and keeps
57 Local<Context> context = Local<Context>::New(isolate, context_);
58 context->Exit();
79 // Perform optional initialization steps on the context after it has
81 virtual void PostInitializeContext(Handle<Context> context) {}
101 Persistent<Context> context_;
128 Local<Context> context = Context::New(isolate,
132 context_.Reset(isolate, context);
133 context->Enter();
135 PostInitializeContext(context);
179 DeclarationContext* context = GetInstance(info.Data());
180 context->get_count_++;
181 info.GetReturnValue().Set(context->Get(key));
189 DeclarationContext* context = GetInstance(info.Data());
190 context->set_count_++;
191 info.GetReturnValue().Set(context->Set(key, value));
198 DeclarationContext* context = GetInstance(info.Data());
199 context->query_count_++;
200 info.GetReturnValue().Set(context->Query(key));
231 { DeclarationContext context;
232 context.Check("var x; x",
239 { DeclarationContext context;
240 context.Check("var x = 0; x",
247 { DeclarationContext context;
248 context.Check("function x() { }; x",
255 { DeclarationContext context;
256 context.Check("const x; x",
263 { DeclarationContext context;
264 context.Check("const x = 0; x",
286 { PresentPropertyContext context;
287 context.Check("var x; x",
294 { PresentPropertyContext context;
295 context.Check("var x = 0; x",
302 { PresentPropertyContext context;
303 context.Check("function x() { }; x",
310 { PresentPropertyContext context;
311 context.Check("const x; x",
318 { PresentPropertyContext context;
319 context.Check("const x = 0; x",
340 { AbsentPropertyContext context;
341 context.Check("var x; x",
348 { AbsentPropertyContext context;
349 context.Check("var x = 0; x",
356 { AbsentPropertyContext context;
357 context.Check("function x() { }; x",
364 { AbsentPropertyContext context;
365 context.Check("const x; x",
372 { AbsentPropertyContext context;
373 context.Check("const x = 0; x",
380 { AbsentPropertyContext context;
381 context.Check("if (false) { var x = 0 }; x",
430 { AppearingPropertyContext context;
431 context.Check("var x; x",
438 { AppearingPropertyContext context;
439 context.Check("var x = 0; x",
446 { AppearingPropertyContext context;
447 context.Check("function x() { }; x",
454 { AppearingPropertyContext context;
455 context.Check("const x; x",
462 { AppearingPropertyContext context;
463 context.Check("const x = 0; x",
469 // initialization to 0 failed (due to context behavior).
522 { ReappearingPropertyContext context;
523 context.Check("const x; var x = 0",
553 context;
554 context.Check("this.x = 87; this.x",
561 { ExistsInPrototypeContext context;
562 context.Check("var x; x",
569 { ExistsInPrototypeContext context;
570 context.Check("var x = 0; x",
577 { ExistsInPrototypeContext context;
578 context.Check("const x; x",
585 { ExistsInPrototypeContext context;
586 context.Check("const x = 0; x",
614 { AbsentInPrototypeContext context;
615 context.Check("if (false) { var x = 0; }; x",
639 virtual void PostInitializeContext(Handle<Context> context) {
640 Local<Object> global_object = context->Global();
642 context->DetachGlobal();
643 context->Global()->SetPrototype(hidden_proto);
644 context->ReattachGlobal(global_object);
661 { ExistsInHiddenPrototypeContext context;
662 context.Check("var x; x",
669 { ExistsInHiddenPrototypeContext context;
670 context.Check("var x = 0; x",
677 { ExistsInHiddenPrototypeContext context;
678 context.Check("function x() { }; x",
686 { ExistsInHiddenPrototypeContext context;
687 context.Check("const x; x",
695 { ExistsInHiddenPrototypeContext context;
696 context.Check("const x = 0; x",
710 context_(Context::New(Isolate::GetCurrent())) {
747 Local<Context> context_;
754 { SimpleContext context;
755 context.Check("var x = 1; x",
757 context.Check("var x = 2; x",
759 context.Check("const x = 3; x",
761 context.Check("const x = 4; x",
763 context.Check("x = 5; x",
765 context.Check("var x = 6; x",
767 context.Check("this.x",
769 context.Check("function x() { return 7 }; x()",
773 { SimpleContext context;
774 context.Check("const x = 1; x",
776 context.Check("var x = 2; x", // assignment ignored
778 context.Check("const x = 3; x",
780 context.Check("x = 4; x", // assignment ignored
782 context.Check("var x = 5; x", // assignment ignored
784 context.Check("this.x",
786 context.Check("function x() { return 7 }; x",
809 SimpleContext context;
810 context.Check(decs[i], EXPECT_RESULT, Number::New(1));
811 context.Check(decs[i+1], EXPECT_RESULT, Number::New(1));
815 if (i/3 < 2) context.Check(decs[i+2], EXPECT_RESULT, Number::New(1));
846 SimpleContext context;
847 context.Check(firsts[i], EXPECT_RESULT, Number::New(1));
851 context.Check(seconds[j],