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

Unified Diff: Source/bindings/core/v8/V8ScriptRunner.cpp

Issue 1061503005: bindings: Use Maybe version of Call() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/core/v8/V8ScriptRunner.cpp
diff --git a/Source/bindings/core/v8/V8ScriptRunner.cpp b/Source/bindings/core/v8/V8ScriptRunner.cpp
index 8adcd2591be05a3a6d6c34099ace94cca4f33f51..eafd3e4a4f4ded640fe101f154caacf54b92b5a3 100644
--- a/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -468,22 +468,22 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::runCompiledInternalScript(v8::Isolate*
return result;
}
-v8::Local<v8::Value> V8ScriptRunner::callFunction(v8::Local<v8::Function> function, ExecutionContext* context, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> args[], v8::Isolate* isolate)
+v8::MaybeLocal<v8::Value> V8ScriptRunner::callFunction(v8::Local<v8::Function> function, ExecutionContext* context, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> args[], v8::Isolate* isolate)
{
TRACE_EVENT0("v8", "v8.callFunction");
TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
if (V8RecursionScope::recursionLevel(isolate) >= kMaxRecursionDepth)
- return throwStackOverflowExceptionIfNeeded(isolate);
+ return v8::MaybeLocal<v8::Value>(throwStackOverflowExceptionIfNeeded(isolate));
RELEASE_ASSERT(!context->isIteratingOverObservers());
if (ScriptForbiddenScope::isScriptForbidden()) {
throwScriptForbiddenException(isolate);
- return v8::Local<v8::Value>();
+ return v8::MaybeLocal<v8::Value>();
}
V8RecursionScope recursionScope(isolate);
- v8::Local<v8::Value> result = function->Call(receiver, argc, args);
+ v8::MaybeLocal<v8::Value> result = function->Call(isolate->GetCurrentContext(), receiver, argc, args);
crashIfV8IsDead();
return result;
}
@@ -493,7 +493,7 @@ v8::MaybeLocal<v8::Value> V8ScriptRunner::callInternalFunction(v8::Local<v8::Fun
TRACE_EVENT0("v8", "v8.callFunction");
TRACE_EVENT_SCOPED_SAMPLING_STATE("v8", "V8Execution");
V8RecursionScope::MicrotaskSuppression recursionScope(isolate);
- v8::MaybeLocal<v8::Value> result = function->Call(receiver, argc, args);
+ v8::MaybeLocal<v8::Value> result = function->Call(isolate->GetCurrentContext(), receiver, argc, args);
crashIfV8IsDead();
return result;
}
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.h ('k') | Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698