| Index: webkit/glue/devtools/js/devtools.js
|
| ===================================================================
|
| --- webkit/glue/devtools/js/devtools.js (revision 13234)
|
| +++ webkit/glue/devtools/js/devtools.js (working copy)
|
| @@ -21,6 +21,8 @@
|
| goog.bind(this.updateFocusedNode, this);
|
| RemoteToolsAgent.FrameNavigate =
|
| goog.bind(this.frameNavigate, this);
|
| + RemoteToolsAgent.AddMessageToConsole =
|
| + goog.bind(this.addMessageToConsole, this);
|
| this.debuggerAgent_ = new devtools.DebuggerAgent();
|
| this.domAgent_ = new devtools.DomAgent();
|
| this.netAgent_ = new devtools.NetAgent();
|
| @@ -130,6 +132,22 @@
|
|
|
|
|
| /**
|
| + * @param {string} message Message to add.
|
| + * @param {string} source Source url.
|
| + * @param {number} line Line number in source.
|
| + * @see tools_agent.h
|
| + */
|
| +devtools.ToolsAgent.prototype.addMessageToConsole = function(message, source,
|
| + line) {
|
| + var console = WebInspector.console;
|
| + if (console) {
|
| + console.addMessage(new WebInspector.ConsoleMessage(
|
| + "", undefined, line, source, undefined, 1, message));
|
| + }
|
| +};
|
| +
|
| +
|
| +/**
|
| * Evaluates js expression.
|
| * @param {string} expr
|
| */
|
| @@ -451,38 +469,38 @@
|
| * representation. Original method uses Object.prototype.toString.call to
|
| * learn if scope object is a JSActivation which doesn't work in Chrome.
|
| */
|
| -WebInspector.ScopeChainSidebarPane.prototype.update = function(callFrame) {
|
| - this.bodyElement.removeChildren();
|
| -
|
| - this.sections = [];
|
| - this.callFrame = callFrame;
|
| -
|
| - if (!callFrame) {
|
| - var infoElement = document.createElement("div");
|
| - infoElement.className = "info";
|
| - infoElement.textContent = WebInspector.UIString("Not Paused");
|
| - this.bodyElement.appendChild(infoElement);
|
| - return;
|
| - }
|
| -
|
| - if (!callFrame._expandedProperties) {
|
| - callFrame._expandedProperties = {};
|
| - }
|
| -
|
| - var scopeObject = callFrame.localScope;
|
| - var title = WebInspector.UIString("Local");
|
| - var subtitle = Object.describe(scopeObject, true);
|
| - var emptyPlaceholder = null;
|
| - var extraProperties = null;
|
| -
|
| - var section = new WebInspector.ObjectPropertiesSection(scopeObject, title,
|
| - subtitle, emptyPlaceholder, true, extraProperties,
|
| - WebInspector.ScopeVariableTreeElement);
|
| - section.editInSelectedCallFrameWhenPaused = true;
|
| - section.pane = this;
|
| -
|
| - section.expanded = true;
|
| -
|
| - this.sections.push(section);
|
| - this.bodyElement.appendChild(section.element);
|
| -};
|
| +WebInspector.ScopeChainSidebarPane.prototype.update = function(callFrame) {
|
| + this.bodyElement.removeChildren();
|
| +
|
| + this.sections = [];
|
| + this.callFrame = callFrame;
|
| +
|
| + if (!callFrame) {
|
| + var infoElement = document.createElement("div");
|
| + infoElement.className = "info";
|
| + infoElement.textContent = WebInspector.UIString("Not Paused");
|
| + this.bodyElement.appendChild(infoElement);
|
| + return;
|
| + }
|
| +
|
| + if (!callFrame._expandedProperties) {
|
| + callFrame._expandedProperties = {};
|
| + }
|
| +
|
| + var scopeObject = callFrame.localScope;
|
| + var title = WebInspector.UIString("Local");
|
| + var subtitle = Object.describe(scopeObject, true);
|
| + var emptyPlaceholder = null;
|
| + var extraProperties = null;
|
| +
|
| + var section = new WebInspector.ObjectPropertiesSection(scopeObject, title,
|
| + subtitle, emptyPlaceholder, true, extraProperties,
|
| + WebInspector.ScopeVariableTreeElement);
|
| + section.editInSelectedCallFrameWhenPaused = true;
|
| + section.pane = this;
|
| +
|
| + section.expanded = true;
|
| +
|
| + this.sections.push(section);
|
| + this.bodyElement.appendChild(section.element);
|
| +};
|
|
|