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

Unified Diff: include/v8.h

Issue 910683002: Introduce a compile method that takes context extensions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 10 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 | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698