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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js

Issue 2203073004: [DevTools] Add awaitPromise flag to Runtime.runScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-call-function-on-async
Patch Set: fixed executionContextId=0 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 callback(scriptId, exceptionDetails); 222 callback(scriptId, exceptionDetails);
223 } 223 }
224 }, 224 },
225 225
226 /** 226 /**
227 * @param {!RuntimeAgent.ScriptId} scriptId 227 * @param {!RuntimeAgent.ScriptId} scriptId
228 * @param {number} executionContextId 228 * @param {number} executionContextId
229 * @param {string=} objectGroup 229 * @param {string=} objectGroup
230 * @param {boolean=} doNotPauseOnExceptionsAndMuteConsole 230 * @param {boolean=} doNotPauseOnExceptionsAndMuteConsole
231 * @param {boolean=} includeCommandLineAPI 231 * @param {boolean=} includeCommandLineAPI
232 * @param {boolean=} returnByValue
233 * @param {boolean=} generatePreview
234 * @param {boolean=} awaitPromise
232 * @param {function(?RuntimeAgent.RemoteObject, ?RuntimeAgent.ExceptionDetai ls=)=} callback 235 * @param {function(?RuntimeAgent.RemoteObject, ?RuntimeAgent.ExceptionDetai ls=)=} callback
233 */ 236 */
234 runScript: function(scriptId, executionContextId, objectGroup, doNotPauseOnE xceptionsAndMuteConsole, includeCommandLineAPI, callback) 237 runScript: function(scriptId, executionContextId, objectGroup, doNotPauseOnE xceptionsAndMuteConsole, includeCommandLineAPI, returnByValue, generatePreview, awaitPromise, callback)
235 { 238 {
236 this._agent.runScript(scriptId, executionContextId, objectGroup, doNotPa useOnExceptionsAndMuteConsole, includeCommandLineAPI, innerCallback); 239 this._agent.runScript(scriptId, executionContextId, objectGroup, doNotPa useOnExceptionsAndMuteConsole, includeCommandLineAPI, returnByValue, generatePre view, awaitPromise, innerCallback);
237 240
238 /** 241 /**
239 * @param {?Protocol.Error} error 242 * @param {?Protocol.Error} error
240 * @param {?RuntimeAgent.RemoteObject} result 243 * @param {?RuntimeAgent.RemoteObject} result
244 * @param {boolean=} wasThrown
241 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails 245 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails
242 */ 246 */
243 function innerCallback(error, result, exceptionDetails) 247 function innerCallback(error, result, wasThrown, exceptionDetails)
244 { 248 {
245 if (error) { 249 if (error) {
246 console.error(error); 250 console.error(error);
247 return; 251 return;
248 } 252 }
249 if (callback) 253 if (callback)
250 callback(result, exceptionDetails); 254 callback(result, exceptionDetails);
251 } 255 }
252 }, 256 },
253 257
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 /** 1012 /**
1009 * @return {boolean} 1013 * @return {boolean}
1010 */ 1014 */
1011 isNormalListenerType: function() 1015 isNormalListenerType: function()
1012 { 1016 {
1013 return this._listenerType === "normal"; 1017 return this._listenerType === "normal";
1014 }, 1018 },
1015 1019
1016 __proto__: WebInspector.SDKObject.prototype 1020 __proto__: WebInspector.SDKObject.prototype
1017 } 1021 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698