Commit 6f7eeec8 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Introduce 'replMode' flag for Runtime.evaluate

This CL adds a boolean flag to Runtime.evaluate that allows REPL
mode to be enabled. REPL mode hasn't landed in V8 yet, and the internal
API for it is still in flux.

R=yangguo@chromium.org

Bug: chromium:1004193
Change-Id: I281285e225d3fd2dd4175f3dd967d6562459a203
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1866510Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64470}
parent b8bf5e53
......@@ -1257,6 +1257,8 @@ domain Runtime
experimental optional TimeDelta timeout
# Disable breakpoints during execution.
experimental optional boolean disableBreaks
# Reserved flag for future REPL mode support. Setting this flag has currently no effect.
experimental optional boolean replMode
returns
# Evaluation result.
RemoteObject result
......
......@@ -235,7 +235,7 @@ void V8RuntimeAgentImpl::evaluate(
Maybe<int> executionContextId, Maybe<bool> returnByValue,
Maybe<bool> generatePreview, Maybe<bool> userGesture,
Maybe<bool> awaitPromise, Maybe<bool> throwOnSideEffect,
Maybe<double> timeout, Maybe<bool> disableBreaks,
Maybe<double> timeout, Maybe<bool> disableBreaks, Maybe<bool> replMode,
std::unique_ptr<EvaluateCallback> callback) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"),
"EvaluateScript");
......
......@@ -68,6 +68,7 @@ class V8RuntimeAgentImpl : public protocol::Runtime::Backend {
Maybe<bool> generatePreview, Maybe<bool> userGesture,
Maybe<bool> awaitPromise, Maybe<bool> throwOnSideEffect,
Maybe<double> timeout, Maybe<bool> disableBreaks,
Maybe<bool> replMode,
std::unique_ptr<EvaluateCallback>) override;
void awaitPromise(const String16& promiseObjectId, Maybe<bool> returnByValue,
Maybe<bool> generatePreview,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment