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

Unified Diff: include/v8.h

Issue 2133133002: Version 5.3.332.12 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.3
Patch Set: Created 4 years, 5 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 | include/v8-version.h » ('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 9eddbb71c5fdbb6611f90c2eb1f9f79091172042..c62a1fd0cab997dad126f9457522d8754747c63d 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3259,6 +3259,7 @@ class PropertyCallbackInfo {
typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info);
+enum class ConstructorBehavior { kThrow, kAllow };
/**
* A JavaScript function object (ECMA-262, 15.3).
@@ -3269,10 +3270,10 @@ class V8_EXPORT Function : public Object {
* Create a function in the current execution context
* for a given FunctionCallback.
*/
- static MaybeLocal<Function> New(Local<Context> context,
- FunctionCallback callback,
- Local<Value> data = Local<Value>(),
- int length = 0);
+ static MaybeLocal<Function> New(
+ Local<Context> context, FunctionCallback callback,
+ Local<Value> data = Local<Value>(), int length = 0,
+ ConstructorBehavior behavior = ConstructorBehavior::kAllow);
static V8_DEPRECATE_SOON(
"Use maybe version",
Local<Function> New(Isolate* isolate, FunctionCallback callback,
@@ -4487,7 +4488,8 @@ class V8_EXPORT FunctionTemplate : public Template {
static Local<FunctionTemplate> New(
Isolate* isolate, FunctionCallback callback = 0,
Local<Value> data = Local<Value>(),
- Local<Signature> signature = Local<Signature>(), int length = 0);
+ Local<Signature> signature = Local<Signature>(), int length = 0,
+ ConstructorBehavior behavior = ConstructorBehavior::kAllow);
/** Get a template included in the snapshot by index. */
static Local<FunctionTemplate> FromSnapshot(Isolate* isolate, size_t index);
« no previous file with comments | « no previous file | include/v8-version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698