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

Unified Diff: src/api.cc

Issue 1346763005: Revert of [runtime] Initial step towards switching Execution::Call to callable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/arm/builtins-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 62e50dd449334960cdf42d6f0bfa72a4182d0921..1b5d428a3c74d657a90f3c6a072e1e5e0cd2ea77 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4254,8 +4254,10 @@
recv_obj = self;
}
Local<Value> result;
- has_pending_exception = !ToLocal<Value>(
- i::Execution::Call(isolate, fun, recv_obj, argc, args), &result);
+ has_pending_exception =
+ !ToLocal<Value>(
+ i::Execution::Call(isolate, fun, recv_obj, argc, args, true),
+ &result);
RETURN_ON_FAILED_EXECUTION(Value);
RETURN_ESCAPED(result);
}
@@ -4363,8 +4365,10 @@
STATIC_ASSERT(sizeof(v8::Local<v8::Value>) == sizeof(i::Object**));
i::Handle<i::Object>* args = reinterpret_cast<i::Handle<i::Object>*>(argv);
Local<Value> result;
- has_pending_exception = !ToLocal<Value>(
- i::Execution::Call(isolate, self, recv_obj, argc, args), &result);
+ has_pending_exception =
+ !ToLocal<Value>(
+ i::Execution::Call(isolate, self, recv_obj, argc, args, true),
+ &result);
RETURN_ON_FAILED_EXECUTION(Value);
RETURN_ESCAPED(result);
}
@@ -6137,7 +6141,7 @@
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
has_pending_exception =
!ToLocal<Value>(i::Execution::Call(isolate, isolate->map_get(), self,
- arraysize(argv), argv),
+ arraysize(argv), argv, false),
&result);
RETURN_ON_FAILED_EXECUTION(Value);
RETURN_ESCAPED(result);
@@ -6151,9 +6155,9 @@
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key),
Utils::OpenHandle(*value)};
- has_pending_exception = !i::Execution::Call(isolate, isolate->map_set(), self,
- arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->map_set(), self, arraysize(argv),
+ argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Map);
RETURN_ESCAPED(Local<Map>::Cast(Utils::ToLocal(result)));
}
@@ -6164,9 +6168,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
- has_pending_exception = !i::Execution::Call(isolate, isolate->map_has(), self,
- arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->map_has(), self, arraysize(argv),
+ argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
return Just(result->IsTrue());
}
@@ -6177,9 +6181,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
- has_pending_exception = !i::Execution::Call(isolate, isolate->map_delete(),
- self, arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->map_delete(), self, arraysize(argv),
+ argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
return Just(result->IsTrue());
}
@@ -6216,8 +6220,7 @@
has_pending_exception =
!i::Execution::Call(isolate, isolate->map_from_array(),
isolate->factory()->undefined_value(),
- arraysize(argv), argv)
- .ToHandle(&result);
+ arraysize(argv), argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Map);
RETURN_ESCAPED(Local<Map>::Cast(Utils::ToLocal(result)));
}
@@ -6252,9 +6255,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
- has_pending_exception = !i::Execution::Call(isolate, isolate->set_add(), self,
- arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->set_add(), self, arraysize(argv),
+ argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Set);
RETURN_ESCAPED(Local<Set>::Cast(Utils::ToLocal(result)));
}
@@ -6265,9 +6268,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
- has_pending_exception = !i::Execution::Call(isolate, isolate->set_has(), self,
- arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->set_has(), self, arraysize(argv),
+ argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
return Just(result->IsTrue());
}
@@ -6278,9 +6281,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> result;
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*key)};
- has_pending_exception = !i::Execution::Call(isolate, isolate->set_delete(),
- self, arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->set_delete(), self, arraysize(argv),
+ argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
return Just(result->IsTrue());
}
@@ -6314,8 +6317,7 @@
has_pending_exception =
!i::Execution::Call(isolate, isolate->set_from_array(),
isolate->factory()->undefined_value(),
- arraysize(argv), argv)
- .ToHandle(&result);
+ arraysize(argv), argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Set);
RETURN_ESCAPED(Local<Set>::Cast(Utils::ToLocal(result)));
}
@@ -6330,10 +6332,12 @@
MaybeLocal<Promise::Resolver> Promise::Resolver::New(Local<Context> context) {
PREPARE_FOR_EXECUTION(context, "Promise::Resolver::New", Resolver);
i::Handle<i::Object> result;
- has_pending_exception =
- !i::Execution::Call(isolate, isolate->promise_create(),
- isolate->factory()->undefined_value(), 0, NULL)
- .ToHandle(&result);
+ has_pending_exception = !i::Execution::Call(
+ isolate,
+ isolate->promise_create(),
+ isolate->factory()->undefined_value(),
+ 0, NULL,
+ false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Promise::Resolver);
RETURN_ESCAPED(Local<Promise::Resolver>::Cast(Utils::ToLocal(result)));
}
@@ -6356,11 +6360,12 @@
PREPARE_FOR_EXECUTION_PRIMITIVE(context, "Promise::Resolver::Resolve", bool);
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> argv[] = {self, Utils::OpenHandle(*value)};
- has_pending_exception =
- i::Execution::Call(isolate, isolate->promise_resolve(),
- isolate->factory()->undefined_value(), arraysize(argv),
- argv)
- .is_null();
+ has_pending_exception = i::Execution::Call(
+ isolate,
+ isolate->promise_resolve(),
+ isolate->factory()->undefined_value(),
+ arraysize(argv), argv,
+ false).is_null();
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
return Just(true);
}
@@ -6377,11 +6382,12 @@
PREPARE_FOR_EXECUTION_PRIMITIVE(context, "Promise::Resolver::Resolve", bool);
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> argv[] = {self, Utils::OpenHandle(*value)};
- has_pending_exception =
- i::Execution::Call(isolate, isolate->promise_reject(),
- isolate->factory()->undefined_value(), arraysize(argv),
- argv)
- .is_null();
+ has_pending_exception = i::Execution::Call(
+ isolate,
+ isolate->promise_reject(),
+ isolate->factory()->undefined_value(),
+ arraysize(argv), argv,
+ false).is_null();
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
return Just(true);
}
@@ -6399,9 +6405,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> argv[] = {Utils::OpenHandle(*handler)};
i::Handle<i::Object> result;
- has_pending_exception = !i::Execution::Call(isolate, isolate->promise_chain(),
- self, arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->promise_chain(), self,
+ arraysize(argv), argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Promise);
RETURN_ESCAPED(Local<Promise>::Cast(Utils::ToLocal(result)));
}
@@ -6419,9 +6425,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) };
i::Handle<i::Object> result;
- has_pending_exception = !i::Execution::Call(isolate, isolate->promise_catch(),
- self, arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->promise_catch(), self,
+ arraysize(argv), argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Promise);
RETURN_ESCAPED(Local<Promise>::Cast(Utils::ToLocal(result)));
}
@@ -6439,9 +6445,9 @@
auto self = Utils::OpenHandle(this);
i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) };
i::Handle<i::Object> result;
- has_pending_exception = !i::Execution::Call(isolate, isolate->promise_then(),
- self, arraysize(argv), argv)
- .ToHandle(&result);
+ has_pending_exception =
+ !i::Execution::Call(isolate, isolate->promise_then(), self,
+ arraysize(argv), argv, false).ToHandle(&result);
RETURN_ON_FAILED_EXECUTION(Promise);
RETURN_ESCAPED(Local<Promise>::Cast(Utils::ToLocal(result)));
}
« no previous file with comments | « no previous file | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698