Lines Matching defs:context

17 #include "src/snapshot/context-deserializer.h"
18 #include "src/snapshot/context-serializer.h"
77 // [6] offset to context 0
78 // [7] offset to context 1
80 // ... offset to context N - 1
84 // ... context 0 snapshot data
85 // ... context 1 snapshot data
220 PrintF("[Deserializing context #%zu (%d bytes) took %0.3f ms]\n",
387 // Serialize each context with a new serializer.
430 PrintF("%10d bytes per context #%d\n", context_allocation_sizes[i], i);
566 // Context snapshots (context-specific data).
577 PrintF("%10d bytes for context #%d\n", payload_length, i);
614 // Extract the offset of the context at a given index from the StartupData,
700 "# The snapshot consists of %d bytes and contains %d context(s).",
709 bool RunExtraCode(v8::Isolate* isolate, v8::Local<v8::Context> context,
711 v8::Context::Scope context_scope(context);
722 if (!v8::ScriptCompiler::Compile(context, &source).ToLocal(&script))
724 if (script->Run(context).IsEmpty()) return false;
734 // If no isolate is passed in, create it (and a new context) from scratch.
741 v8::Local<v8::Context> context = v8::Context::New(isolate);
743 !RunExtraCode(isolate, context, embedded_source, "<embedded>")) {
746 snapshot_creator.SetDefaultContext(context);
758 // - Create a new context to run the warmup script. This will trigger
760 // - Create a new context. This context will be unpolluted.
761 // - Serialize the isolate and the second context into a new snapshot blob.
766 v8::Local<v8::Context> context = v8::Context::New(isolate);
767 if (!RunExtraCode(isolate, context, warmup_source, "<warm-up>")) {
774 v8::Local<v8::Context> context = v8::Context::New(isolate);
775 snapshot_creator.SetDefaultContext(context);