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

Unified Diff: src/runtime.cc

Issue 64223010: Harmony promises (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: "Renamed .when to .chain; Dmitry's comments" Created 7 years, 1 month 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 | « src/runtime.h ('k') | src/v8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 9d317ca535f9630d97ccf08d920adee1e4284ca4..b7753975970576d8fb99b8dadcb55660dfed54c9 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2630,6 +2630,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SpecialArrayFunctions) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_IsCallable) {
+ SealHandleScope shs(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_CHECKED(Object, obj, 0);
+ return isolate->heap()->ToBoolean(obj->IsCallable());
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_IsClassicModeFunction) {
SealHandleScope shs(isolate);
ASSERT(args.length() == 1);
@@ -14325,6 +14333,18 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Abort) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_AbortJS) {
+ HandleScope scope(isolate);
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(String, message, 0);
+ OS::PrintError("abort: %s\n", *message->ToCString());
+ isolate->PrintStack(stderr);
+ OS::Abort();
+ UNREACHABLE();
+ return NULL;
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
@@ -14617,11 +14637,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetIsObserved) {
}
-RUNTIME_FUNCTION(MaybeObject*, Runtime_SetObserverDeliveryPending) {
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetMicrotaskPending) {
SealHandleScope shs(isolate);
- ASSERT(args.length() == 0);
- isolate->set_observer_delivery_pending(true);
- return isolate->heap()->undefined_value();
+ ASSERT(args.length() == 1);
+ CONVERT_BOOLEAN_ARG_CHECKED(new_state, 0);
+ bool old_state = isolate->microtask_pending();
+ isolate->set_microtask_pending(new_state);
+ return isolate->heap()->ToBoolean(old_state);
}
« no previous file with comments | « src/runtime.h ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698