diff --git a/front_end/main/Main.js b/front_end/main/Main.js index 737d230ca0..eb7fcc5d43 100644 --- a/front_end/main/Main.js +++ b/front_end/main/Main.js @@ -303,7 +303,7 @@ WebInspector.Main.prototype = { InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.ReloadInspectedPage, this._reloadInspectedPage, this); InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this); - this._mainTarget.runtimeAgent().runIfWaitingForDebugger(); + this._mainTarget.runtimeAgent().run(); if (this._mainTarget.hasBrowserCapability()) this._mainTarget.inspectorAgent().enable(); diff --git a/front_end/sdk/DebuggerModel.js b/front_end/sdk/DebuggerModel.js index 9a8f771807..843f7eb8e3 100644 --- a/front_end/sdk/DebuggerModel.js +++ b/front_end/sdk/DebuggerModel.js @@ -611,12 +611,12 @@ WebInspector.DebuggerModel.prototype = { * @param {string} code * @param {string} objectGroup * @param {boolean} includeCommandLineAPI - * @param {boolean} silent + * @param {boolean} doNotPauseOnExceptionsAndMuteConsole * @param {boolean} returnByValue * @param {boolean} generatePreview * @param {function(?WebInspector.RemoteObject, !RuntimeAgent.ExceptionDetails=)} callback */ - evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, callback) + evaluateOnSelectedCallFrame: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback) { /** * @param {?RuntimeAgent.RemoteObject} result @@ -631,7 +631,7 @@ WebInspector.DebuggerModel.prototype = { callback(this.target().runtimeModel.createRemoteObject(result), exceptionDetails); } - this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, didEvaluate.bind(this)); + this.selectedCallFrame().evaluate(code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEvaluate.bind(this)); }, /** @@ -1061,12 +1061,12 @@ WebInspector.DebuggerModel.CallFrame.prototype = { * @param {string} code * @param {string} objectGroup * @param {boolean} includeCommandLineAPI - * @param {boolean} silent + * @param {boolean} doNotPauseOnExceptionsAndMuteConsole * @param {boolean} returnByValue * @param {boolean} generatePreview * @param {function(?RuntimeAgent.RemoteObject, !RuntimeAgent.ExceptionDetails=)} callback */ - evaluate: function(code, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, callback) + evaluate: function(code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback) { /** * @param {?Protocol.Error} error @@ -1082,7 +1082,7 @@ WebInspector.DebuggerModel.CallFrame.prototype = { } callback(result, exceptionDetails); } - this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, didEvaluateOnCallFrame); + this._debuggerAgent.evaluateOnCallFrame(this._payload.callFrameId, code, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, didEvaluateOnCallFrame); }, /** diff --git a/front_end/sdk/RemoteObject.js b/front_end/sdk/RemoteObject.js index aa3765c0bf..cf61a22a5f 100644 --- a/front_end/sdk/RemoteObject.js +++ b/front_end/sdk/RemoteObject.js @@ -656,7 +656,7 @@ WebInspector.RemoteObjectImpl.prototype = { return; } - this._runtimeAgent.invoke_evaluate({expression:value, silent:true}, evaluatedCallback.bind(this)); + this._runtimeAgent.invoke_evaluate({expression:value, doNotPauseOnExceptionsAndMuteConsole:true}, evaluatedCallback.bind(this)); /** * @param {?Protocol.Error} error diff --git a/front_end/sdk/RuntimeModel.js b/front_end/sdk/RuntimeModel.js index b1b20e18ed..86b44cd03d 100644 --- a/front_end/sdk/RuntimeModel.js +++ b/front_end/sdk/RuntimeModel.js @@ -243,16 +243,16 @@ WebInspector.RuntimeModel.prototype = { * @param {!RuntimeAgent.ScriptId} scriptId * @param {number} executionContextId * @param {string=} objectGroup - * @param {boolean=} silent + * @param {boolean=} doNotPauseOnExceptionsAndMuteConsole * @param {boolean=} includeCommandLineAPI * @param {boolean=} returnByValue * @param {boolean=} generatePreview * @param {boolean=} awaitPromise * @param {function(?RuntimeAgent.RemoteObject, ?RuntimeAgent.ExceptionDetails=)=} callback */ - runScript: function(scriptId, executionContextId, objectGroup, silent, includeCommandLineAPI, returnByValue, generatePreview, awaitPromise, callback) + runScript: function(scriptId, executionContextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, includeCommandLineAPI, returnByValue, generatePreview, awaitPromise, callback) { - this._agent.runScript(scriptId, executionContextId, objectGroup, silent, includeCommandLineAPI, returnByValue, generatePreview, awaitPromise, innerCallback); + this._agent.runScript(scriptId, executionContextId, objectGroup, doNotPauseOnExceptionsAndMuteConsole, includeCommandLineAPI, returnByValue, generatePreview, awaitPromise, innerCallback); /** * @param {?Protocol.Error} error @@ -547,17 +547,17 @@ WebInspector.ExecutionContext.prototype = { * @param {string} expression * @param {string} objectGroup * @param {boolean} includeCommandLineAPI - * @param {boolean} silent + * @param {boolean} doNotPauseOnExceptionsAndMuteConsole * @param {boolean} returnByValue * @param {boolean} generatePreview * @param {boolean} userGesture * @param {function(?WebInspector.RemoteObject, !RuntimeAgent.ExceptionDetails=)} callback */ - evaluate: function(expression, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, userGesture, callback) + evaluate: function(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, userGesture, callback) { // FIXME: It will be moved to separate ExecutionContext. if (this.debuggerModel.selectedCallFrame()) { - this.debuggerModel.evaluateOnSelectedCallFrame(expression, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, callback); + this.debuggerModel.evaluateOnSelectedCallFrame(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, callback); return; } this._evaluateGlobal.apply(this, arguments); @@ -577,13 +577,13 @@ WebInspector.ExecutionContext.prototype = { * @param {string} expression * @param {string} objectGroup * @param {boolean} includeCommandLineAPI - * @param {boolean} silent + * @param {boolean} doNotPauseOnExceptionsAndMuteConsole * @param {boolean} returnByValue * @param {boolean} generatePreview * @param {boolean} userGesture * @param {function(?WebInspector.RemoteObject, !RuntimeAgent.ExceptionDetails=)} callback */ - _evaluateGlobal: function(expression, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, userGesture, callback) + _evaluateGlobal: function(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, userGesture, callback) { if (!expression) { // There is no expression, so the completion should happen against global properties. @@ -605,7 +605,7 @@ WebInspector.ExecutionContext.prototype = { } callback(this.runtimeModel.createRemoteObject(result), exceptionDetails); } - this.target().runtimeAgent().evaluate(expression, objectGroup, includeCommandLineAPI, silent, this.id, returnByValue, generatePreview, userGesture, false, evalCallback.bind(this)); + this.target().runtimeAgent().evaluate(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, generatePreview, userGesture, false, evalCallback.bind(this)); }, /** diff --git a/front_end/sdk/ServiceWorkerManager.js b/front_end/sdk/ServiceWorkerManager.js index fb6a4595ce..f24c6b31ab 100644 --- a/front_end/sdk/ServiceWorkerManager.js +++ b/front_end/sdk/ServiceWorkerManager.js @@ -439,7 +439,7 @@ WebInspector.ServiceWorker = function(manager, workerId, url, versionId) this._target = WebInspector.targetManager.createTarget(this._name, capabilities, this._connection, manager.target()); this._target[WebInspector.ServiceWorker.Symbol] = this; this._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Events.WorkersUpdated); - this._target.runtimeAgent().runIfWaitingForDebugger(); + this._target.runtimeAgent().run(); } WebInspector.ServiceWorker.Symbol = Symbol("serviceWorker"); diff --git a/front_end/sdk/WorkerManager.js b/front_end/sdk/WorkerManager.js index a697306df9..3bde9307c1 100644 --- a/front_end/sdk/WorkerManager.js +++ b/front_end/sdk/WorkerManager.js @@ -109,7 +109,7 @@ WebInspector.WorkerManager.prototype = { var mainIsServiceWorker = WebInspector.targetManager.mainTarget().hasWorkerCapability() && !WebInspector.targetManager.mainTarget().hasBrowserCapability(); if (mainIsServiceWorker && waitingForDebugger) target.debuggerAgent().pause(); - target.runtimeAgent().runIfWaitingForDebugger(); + target.runtimeAgent().run(); }, /** diff --git a/front_end/snippets/ScriptSnippetModel.js b/front_end/snippets/ScriptSnippetModel.js index f51798300b..29118ce02c 100644 --- a/front_end/snippets/ScriptSnippetModel.js +++ b/front_end/snippets/ScriptSnippetModel.js @@ -270,7 +270,7 @@ WebInspector.ScriptSnippetModel.prototype = { _runScript: function(scriptId, executionContext, sourceURL) { var target = executionContext.target(); - target.runtimeModel.runScript(scriptId, executionContext.id, "console", /* silent */ false, /* includeCommandLineAPI */ true, /* returnByValue */ false, /* generatePreview */ true, /* awaitPromise */ undefined, runCallback.bind(this, target)); + target.runtimeModel.runScript(scriptId, executionContext.id, "console", /* doNotPauseOnExceptionsAndMuteConsole */ false, /* includeCommandLineAPI */ true, /* returnByValue */ false, /* generatePreview */ true, /* awaitPromise */ undefined, runCallback.bind(this, target)); /** * @param {!WebInspector.Target} target