[Streams API] ReadableJSStream should handle promises returned by JS source start...
[WebKit-https.git] / Source / JavaScriptCore / runtime / JSFunction.h
index 86dff12..b6bcc0d 100644 (file)
@@ -45,6 +45,8 @@ class SpeculativeJIT;
 class JITCompiler;
 }
 
+typedef std::function<EncodedJSValue (ExecState*)> NativeStdFunction;
+
 JS_EXPORT_PRIVATE EncodedJSValue JSC_HOST_CALL callHostFunctionAsConstructor(ExecState*);
 
 JS_EXPORT_PRIVATE String getCalculatedDisplayName(CallFrame*, JSObject*);
@@ -68,6 +70,7 @@ public:
     JS_EXPORT_PRIVATE static JSFunction* create(VM&, JSGlobalObject*, int length, const String& name, NativeFunction, Intrinsic = NoIntrinsic, NativeFunction nativeConstructor = callHostFunctionAsConstructor);
     
     static JSFunction* createWithInvalidatedReallocationWatchpoint(VM&, FunctionExecutable*, JSScope*);
+    JS_EXPORT_PRIVATE static JSFunction* create(VM&, JSGlobalObject*, int length, const String& name, NativeStdFunction&&, Intrinsic = NoIntrinsic, NativeFunction nativeConstructor = callHostFunctionAsConstructor);
 
     static JSFunction* create(VM&, FunctionExecutable*, JSScope*);