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

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

Issue 2747553002: [DevTools] Rework Popover API (Closed)
Patch Set: rebased Created 3 years, 9 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/DebuggerModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
index 078ee22cfdc41e419d067a1551ca32833a48ad29..5d6fcff8b755158ef41579927461953878029312 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -1185,6 +1185,36 @@ SDK.DebuggerModel.CallFrame = class {
}
/**
+ * @param {string} code
+ * @param {string} objectGroup
+ * @param {boolean} includeCommandLineAPI
+ * @param {boolean} silent
+ * @param {boolean} returnByValue
+ * @param {boolean} generatePreview
+ * @return {!Promise<?SDK.RemoteObject>}
+ */
+ evaluatePromise(code, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview) {
+ var fulfill;
+ var promise = new Promise(x => fulfill = x);
+ this.evaluate(
+ code, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, callback.bind(this));
+ return promise;
+
+ /**
+ * @param {?Protocol.Runtime.RemoteObject} result
+ * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails
+ * @param {string=} error
+ * @this {SDK.DebuggerModel.CallFrame}
+ */
+ function callback(result, exceptionDetails, error) {
+ if (!result || exceptionDetails)
+ fulfill(null);
+ else
+ fulfill(this.debuggerModel._runtimeModel.createRemoteObject(result));
+ }
+ }
+
+ /**
* @param {function(?Protocol.Error=)=} callback
*/
restart(callback) {

Powered by Google App Engine
This is Rietveld 408576698