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

Unified Diff: Source/bindings/v8/V8PromiseUtilities.h

Issue 17035004: [ABANDONED] Introduce Promise example implementation written in JavaScript. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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
Index: Source/bindings/v8/V8PromiseUtilities.h
diff --git a/Source/core/html/parser/HTMLParserThread.h b/Source/bindings/v8/V8PromiseUtilities.h
similarity index 67%
copy from Source/core/html/parser/HTMLParserThread.h
copy to Source/bindings/v8/V8PromiseUtilities.h
index 9e687de451a566e58e08b090d4beda41336584f0..7fc9b7fea32594d31c80e58031590318da03f52a 100644
--- a/Source/core/html/parser/HTMLParserThread.h
+++ b/Source/bindings/v8/V8PromiseUtilities.h
@@ -28,27 +28,23 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLParserThread_h
-#define HTMLParserThread_h
+#ifndef V8PromiseUtilities_h
+#define V8PromiseUtilities_h
-#include "wtf/Functional.h"
-#include "wtf/OwnPtr.h"
-#include "public/platform/WebThread.h"
+#include <v8.h>
namespace WebCore {
-
-class HTMLParserThread {
+class V8PromiseUtilities {
public:
- static HTMLParserThread* shared();
- void postTask(const Closure&);
-
-private:
- HTMLParserThread();
- ~HTMLParserThread();
+ static v8::Handle<v8::Function> promiseConstructor(v8::Isolate*);
+ static v8::Handle<v8::Value> promisePrototype(v8::Isolate*);
- OwnPtr<WebKit::WebThread> m_thread;
+ static v8::Handle<v8::Value> callUnwrappedMethod(const char* name, const v8::FunctionCallbackInfo<v8::Value>& args, v8::Handle<v8::Value> prototype);
+ static v8::Handle<v8::Value> callUnwrappedMethod(const char* name, v8::Handle<v8::Object> thisObject,
+ int argc, v8::Handle<v8::Value> argv[], v8::Isolate*, v8::Handle<v8::Value> prototype);
+ static v8::Handle<v8::Value> callStatic(const char* name, const v8::FunctionCallbackInfo<v8::Value>& args, v8::Handle<v8::Value> constructor);
abarth-chromium 2013/06/17 18:05:06 Should these last three be part of V8ScriptRunner?
yhirano 2013/06/18 08:56:15 Done.
};
} // namespace WebCore
-#endif // HTMLParserThread_h
+#endif // V8PromiseUtilities_h

Powered by Google App Engine
This is Rietveld 408576698