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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js

Issue 2234983002: [DevTools] Removed wasThrown from evaluate-like protocol methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 4 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: third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
index 9b48adf7ba115910643b4f43ee2e1eca48ea7cf2..f3ffecd8973d23b97a3dceefec10586579183be5 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
@@ -660,12 +660,12 @@ WebInspector.RemoteObjectImpl.prototype = {
/**
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
- * @param {boolean=} wasThrown
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
* @this {WebInspector.RemoteObject}
*/
- function evaluatedCallback(error, result, wasThrown)
+ function evaluatedCallback(error, result, exceptionDetails)
{
- if (error || wasThrown) {
+ if (error || !!exceptionDetails) {
callback(error || (result.type !== "string" ? result.description : /** @type {string} */(result.value)));
return;
}
@@ -699,11 +699,11 @@ WebInspector.RemoteObjectImpl.prototype = {
/**
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
- * @param {boolean=} wasThrown
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
*/
- function propertySetCallback(error, result, wasThrown)
+ function propertySetCallback(error, result, exceptionDetails)
{
- if (error || wasThrown) {
+ if (error || !!exceptionDetails) {
callback(error || result.description);
return;
}
@@ -729,11 +729,11 @@ WebInspector.RemoteObjectImpl.prototype = {
/**
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
- * @param {boolean=} wasThrown
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
*/
- function deletePropertyCallback(error, result, wasThrown)
+ function deletePropertyCallback(error, result, exceptionDetails)
{
- if (error || wasThrown) {
+ if (error || !!exceptionDetails) {
callback(error || result.description);
return;
}
@@ -755,17 +755,17 @@ WebInspector.RemoteObjectImpl.prototype = {
/**
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
- * @param {boolean=} wasThrown
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
* @this {WebInspector.RemoteObjectImpl}
*/
- function mycallback(error, result, wasThrown)
+ function mycallback(error, result, exceptionDetails)
{
if (!callback)
return;
if (error)
callback(null, false);
else
- callback(this.target().runtimeModel.createRemoteObject(result), wasThrown);
+ callback(this.target().runtimeModel.createRemoteObject(result), !!exceptionDetails);
}
this._runtimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, undefined, undefined, undefined, undefined, mycallback.bind(this));
@@ -782,11 +782,11 @@ WebInspector.RemoteObjectImpl.prototype = {
/**
* @param {?Protocol.Error} error
* @param {!RuntimeAgent.RemoteObject} result
- * @param {boolean=} wasThrown
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
*/
- function mycallback(error, result, wasThrown)
+ function mycallback(error, result, exceptionDetails)
{
- callback((error || wasThrown) ? null : result.value);
+ callback((error || !!exceptionDetails) ? null : result.value);
}
this._runtimeAgent.callFunctionOn(this._objectId, functionDeclaration.toString(), args, true, true, false, undefined, undefined, mycallback);

Powered by Google App Engine
This is Rietveld 408576698