| Index: Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
|
| diff --git a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
|
| index 581d01f5f2e924e51870f33b4977cdd79432582f..b651b47e6a5c8beb9279c29305f4508086605538 100644
|
| --- a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
|
| +++ b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
|
| @@ -254,8 +254,26 @@ WebInspector.WatchExpression.prototype = {
|
| update: function()
|
| {
|
| var currentExecutionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
|
| - if (currentExecutionContext && this._expression)
|
| + if (currentExecutionContext && this._expression) {
|
| + var location = currentExecutionContext.pauseLocation();
|
| + if (location) {
|
| + var activeMime = WebInspector.ResourceType.mimeFromUrl(location.source);
|
| + if (WebInspector.languageService.handles.transpile(activeMime)) {
|
| + var expr = this._expression;
|
| + var prom = this._pendingUpdate = WebInspector.languageService.transpile(activeMime, expr, location).then(result => {
|
| + if (this._pendingUpdate !== prom) {
|
| + //cancelled by another update
|
| + return;
|
| + }
|
| + currentExecutionContext.evaluate(result, WebInspector.WatchExpression._watchObjectGroupId, false, true, false, false, this._createWatchExpression.bind(this));
|
| + }).catch((e) => {
|
| + currentExecutionContext.evaluate(expr, WebInspector.WatchExpression._watchObjectGroupId, false, true, false, false, this._createWatchExpression.bind(this));
|
| + });
|
| + return;
|
| + }
|
| + }
|
| currentExecutionContext.evaluate(this._expression, WebInspector.WatchExpression._watchObjectGroupId, false, true, false, false, this._createWatchExpression.bind(this));
|
| + }
|
| },
|
|
|
| startEditing: function()
|
|
|