| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index bcaf954df39f3f7548b6df2126e04e6a540bdf05..0312ef48a93db77732e6c980ff6b5f67c33b7071 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -1321,6 +1321,20 @@ class V8_EXPORT ScriptCompiler {
|
| Isolate* isolate, Source* source,
|
| CompileOptions options = kNoCompileOptions);
|
|
|
| + /**
|
| + * Compile a function for a given context. This is equivalent to running
|
| + *
|
| + * with (obj) {
|
| + * return function() { ... }
|
| + * }
|
| + *
|
| + * It is possible to specify multiple context extensions (obj in the above
|
| + * example).
|
| + */
|
| + static Local<Function> CompileFunctionInContext(
|
| + Isolate* isolate, Source* source, Local<Context> context,
|
| + size_t context_extension_count, Local<Object> context_extensions[]);
|
| +
|
| private:
|
| static Local<UnboundScript> CompileUnboundInternal(Isolate* isolate,
|
| Source* source,
|
|
|