| Index: Source/devtools/front_end/sources/SourcesPanel.js
|
| diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js
|
| index 41b4d3bc39510cf0e0356be5aef6b5b6f8c08a01..41c1ab98c90ee46489ba03a47e9b5a981e1fbdb8 100644
|
| --- a/Source/devtools/front_end/sources/SourcesPanel.js
|
| +++ b/Source/devtools/front_end/sources/SourcesPanel.js
|
| @@ -904,7 +904,11 @@ WebInspector.SourcesPanel.prototype = {
|
| if (!currentExecutionContext)
|
| return;
|
|
|
| - currentExecutionContext.evaluate("window", "", false, true, false, false, didGetGlobalObject.bind(null, currentExecutionContext.target()));
|
| + if (remoteObject.language == 'dart') {
|
| + currentExecutionContext.evaluate("$consoleVariables", "", true, true, false, false, didGetGlobalObject.bind(null, currentExecutionContext.target()));
|
| + } else {
|
| + currentExecutionContext.evaluate("window", "", false, true, false, false, didGetGlobalObject.bind(null, currentExecutionContext.target()));
|
| + }
|
| /**
|
| * @param {!WebInspector.Target} target
|
| * @param {?WebInspector.RemoteObject} global
|
| @@ -927,10 +931,20 @@ WebInspector.SourcesPanel.prototype = {
|
| return name;
|
| }
|
|
|
| + var dartRemoteFunction =
|
| + "(val) {\n" +
|
| + " var index = 1;\n" +
|
| + " var vars = variables();\n" +
|
| + " while(vars.contains('temp$index')) { ++index; };\n" +
|
| + " var name = 'temp$index';\n" +
|
| + " setVariable(name, val);\n" +
|
| + " return name;\n" +
|
| + "}";
|
| +
|
| if (wasThrown || !global)
|
| failedToSave(target, global);
|
| else
|
| - global.callFunction(remoteFunction, [WebInspector.RemoteObject.toCallArgument(remoteObject)], didSave.bind(null, global));
|
| + global.callFunction(remoteObject.language == 'dart' ? dartRemoteFunction : remoteFunction, [WebInspector.RemoteObject.toCallArgument(remoteObject)], didSave.bind(null, global));
|
| }
|
|
|
| /**
|
|
|