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

Unified Diff: src/execution.cc

Issue 1423723002: Map v8::Function to JSReceiver + IsCallable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 2 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 | « src/execution.h ('k') | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index 526390bd187b34f37bf8cd18eb9543d311fe0bd8..4b9417e967128a55e3ec0321a8967942208d8a66 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -185,12 +185,12 @@ MaybeHandle<Object> Execution::New(Isolate* isolate, Handle<Object> constructor,
}
-MaybeHandle<Object> Execution::TryCall(Handle<JSFunction> func,
+MaybeHandle<Object> Execution::TryCall(Isolate* isolate,
+ Handle<Object> callable,
Handle<Object> receiver, int argc,
Handle<Object> args[],
MaybeHandle<Object>* exception_out) {
bool is_termination = false;
- Isolate* isolate = func->GetIsolate();
MaybeHandle<Object> maybe_result;
if (exception_out != NULL) *exception_out = MaybeHandle<Object>();
// Enter a try-block while executing the JavaScript code. To avoid
@@ -202,7 +202,7 @@ MaybeHandle<Object> Execution::TryCall(Handle<JSFunction> func,
catcher.SetVerbose(false);
catcher.SetCaptureMessage(false);
- maybe_result = Call(isolate, func, receiver, argc, args);
+ maybe_result = Call(isolate, callable, receiver, argc, args);
if (maybe_result.is_null()) {
DCHECK(catcher.HasCaught());
@@ -478,7 +478,7 @@ Handle<String> Execution::GetStackTraceLine(Handle<Object> recv,
Isolate* isolate = fun->GetIsolate();
Handle<Object> args[] = { recv, fun, pos, is_global };
MaybeHandle<Object> maybe_result =
- TryCall(isolate->get_stack_trace_line_fun(),
+ TryCall(isolate, isolate->get_stack_trace_line_fun(),
isolate->factory()->undefined_value(), arraysize(args), args);
Handle<Object> result;
if (!maybe_result.ToHandle(&result) || !result->IsString()) {
« no previous file with comments | « src/execution.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698