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

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

Issue 1827993002: [DevTools] Remove promise inspector experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 AsyncOperationCompleted: "AsyncOperationCompleted", 82 AsyncOperationCompleted: "AsyncOperationCompleted",
83 DebuggerWasEnabled: "DebuggerWasEnabled", 83 DebuggerWasEnabled: "DebuggerWasEnabled",
84 DebuggerWasDisabled: "DebuggerWasDisabled", 84 DebuggerWasDisabled: "DebuggerWasDisabled",
85 BeforeDebuggerPaused: "BeforeDebuggerPaused", 85 BeforeDebuggerPaused: "BeforeDebuggerPaused",
86 DebuggerPaused: "DebuggerPaused", 86 DebuggerPaused: "DebuggerPaused",
87 DebuggerResumed: "DebuggerResumed", 87 DebuggerResumed: "DebuggerResumed",
88 ParsedScriptSource: "ParsedScriptSource", 88 ParsedScriptSource: "ParsedScriptSource",
89 FailedToParseScriptSource: "FailedToParseScriptSource", 89 FailedToParseScriptSource: "FailedToParseScriptSource",
90 GlobalObjectCleared: "GlobalObjectCleared", 90 GlobalObjectCleared: "GlobalObjectCleared",
91 CallFrameSelected: "CallFrameSelected", 91 CallFrameSelected: "CallFrameSelected",
92 ConsoleCommandEvaluatedInSelectedCallFrame: "ConsoleCommandEvaluatedInSelect edCallFrame", 92 ConsoleCommandEvaluatedInSelectedCallFrame: "ConsoleCommandEvaluatedInSelect edCallFrame"
93 PromiseUpdated: "PromiseUpdated",
94 } 93 }
95 94
96 /** @enum {string} */ 95 /** @enum {string} */
97 WebInspector.DebuggerModel.BreakReason = { 96 WebInspector.DebuggerModel.BreakReason = {
98 AsyncOperation: "AsyncOperation", 97 AsyncOperation: "AsyncOperation",
99 DOM: "DOM", 98 DOM: "DOM",
100 EventListener: "EventListener", 99 EventListener: "EventListener",
101 XHR: "XHR", 100 XHR: "XHR",
102 Exception: "exception", 101 Exception: "exception",
103 PromiseRejection: "promiseRejection", 102 PromiseRejection: "promiseRejection",
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 { 343 {
345 if (error) { 344 if (error) {
346 console.error(error); 345 console.error(error);
347 callback(null); 346 callback(null);
348 return; 347 return;
349 } 348 }
350 callback(response); 349 callback(response);
351 } 350 }
352 }, 351 },
353 352
354 /**
355 * @param {boolean} captureStacks
356 */
357 enablePromiseTracker: function(captureStacks)
358 {
359 this._agent.enablePromiseTracker(captureStacks);
360 },
361
362 disablePromiseTracker: function()
363 {
364 this._agent.disablePromiseTracker();
365 },
366
367 /**
368 * @param {number} promiseId
369 * @param {string=} objectGroup
370 * @param {function(?RuntimeAgent.RemoteObject)=} callback
371 */
372 getPromiseById: function(promiseId, objectGroup, callback)
373 {
374 this._agent.getPromiseById(promiseId, objectGroup, innerCallback);
375
376 /**
377 * @param {?Protocol.Error} error
378 * @param {?RuntimeAgent.RemoteObject} promise
379 */
380 function innerCallback(error, promise)
381 {
382 if (error) {
383 console.error(error);
384 callback(null);
385 return;
386 }
387 callback(promise);
388 }
389 },
390
391 flushAsyncOperationEvents: function() 353 flushAsyncOperationEvents: function()
392 { 354 {
393 this._agent.flushAsyncOperationEvents(); 355 this._agent.flushAsyncOperationEvents();
394 }, 356 },
395 357
396 /** 358 /**
397 * @param {number} operationId 359 * @param {number} operationId
398 */ 360 */
399 setAsyncOperationBreakpoint: function(operationId) 361 setAsyncOperationBreakpoint: function(operationId)
400 { 362 {
(...skipping 19 matching lines...) Expand all
420 382
421 globalObjectCleared: function() 383 globalObjectCleared: function()
422 { 384 {
423 this._setDebuggerPausedDetails(null); 385 this._setDebuggerPausedDetails(null);
424 this._reset(); 386 this._reset();
425 // TODO(dgozman): move clients to ExecutionContextDestroyed/ScriptCollec ted events. 387 // TODO(dgozman): move clients to ExecutionContextDestroyed/ScriptCollec ted events.
426 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared); 388 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared);
427 }, 389 },
428 390
429 /** 391 /**
430 * @param {string} eventType
431 * @param {!DebuggerAgent.PromiseDetails} promise
432 */
433 _promiseUpdated: function(eventType, promise)
434 {
435 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.PromiseU pdated, { eventType: eventType, promise: promise });
436 },
437
438 /**
439 * @param {!DebuggerAgent.AsyncOperation} operation 392 * @param {!DebuggerAgent.AsyncOperation} operation
440 */ 393 */
441 _asyncOperationStarted: function(operation) 394 _asyncOperationStarted: function(operation)
442 { 395 {
443 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOpe rationStarted, operation); 396 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOpe rationStarted, operation);
444 }, 397 },
445 398
446 /** 399 /**
447 * @param {number} operationId 400 * @param {number} operationId
448 */ 401 */
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 * @param {!DebuggerAgent.BreakpointId} breakpointId 971 * @param {!DebuggerAgent.BreakpointId} breakpointId
1019 * @param {!DebuggerAgent.Location} location 972 * @param {!DebuggerAgent.Location} location
1020 */ 973 */
1021 breakpointResolved: function(breakpointId, location) 974 breakpointResolved: function(breakpointId, location)
1022 { 975 {
1023 this._debuggerModel._breakpointResolved(breakpointId, location); 976 this._debuggerModel._breakpointResolved(breakpointId, location);
1024 }, 977 },
1025 978
1026 /** 979 /**
1027 * @override 980 * @override
1028 * @param {string} eventType
1029 * @param {!DebuggerAgent.PromiseDetails} promise
1030 */
1031 promiseUpdated: function(eventType, promise)
1032 {
1033 this._debuggerModel._promiseUpdated(eventType, promise);
1034 },
1035
1036 /**
1037 * @override
1038 * @param {!DebuggerAgent.AsyncOperation} operation 981 * @param {!DebuggerAgent.AsyncOperation} operation
1039 */ 982 */
1040 asyncOperationStarted: function(operation) 983 asyncOperationStarted: function(operation)
1041 { 984 {
1042 this._debuggerModel._asyncOperationStarted(operation); 985 this._debuggerModel._asyncOperationStarted(operation);
1043 }, 986 },
1044 987
1045 /** 988 /**
1046 * @override 989 * @override
1047 * @param {number} operationId 990 * @param {number} operationId
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 /** 1380 /**
1438 * @param {?WebInspector.Target} target 1381 * @param {?WebInspector.Target} target
1439 * @return {?WebInspector.DebuggerModel} 1382 * @return {?WebInspector.DebuggerModel}
1440 */ 1383 */
1441 WebInspector.DebuggerModel.fromTarget = function(target) 1384 WebInspector.DebuggerModel.fromTarget = function(target)
1442 { 1385 {
1443 if (!target || !target.hasJSContext()) 1386 if (!target || !target.hasJSContext())
1444 return null; 1387 return null;
1445 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1388 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1446 } 1389 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698