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

Unified Diff: inspector/front-end/inspector.js

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 11 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
« no previous file with comments | « inspector/front-end/WatchExpressionsSidebarPane.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: inspector/front-end/inspector.js
===================================================================
--- inspector/front-end/inspector.js (revision 53180)
+++ inspector/front-end/inspector.js (working copy)
@@ -389,6 +389,8 @@
WebInspector.loaded = function()
{
+ InspectorBackend.setInjectedScriptSource("(" + injectedScriptConstructor + ");");
+
var platform = WebInspector.platform;
document.body.addStyleClass("platform-" + platform);
var port = WebInspector.port;
@@ -1147,6 +1149,7 @@
WebInspector.pausedScript = function(callFrames)
{
+ callFrames = JSON.parse(callFrames);
this.panels.scripts.debuggerPaused(callFrames);
}
@@ -1203,7 +1206,7 @@
WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning));
}
-WebInspector.addConsoleMessage = function(payload)
+WebInspector.addConsoleMessage = function(payload, argumentsStringified, opt_args)
{
var consoleMessage = new WebInspector.ConsoleMessage(
payload.source,
@@ -1213,7 +1216,14 @@
payload.url,
payload.groupLevel,
payload.repeatCount);
- consoleMessage.setMessageBody(Array.prototype.slice.call(arguments, 1));
+ var parsedArguments = [];
+ for (var i = 2; i < arguments.length; i++) {
+ if (argumentsStringified)
+ parsedArguments.push(JSON.parse(arguments[i]));
+ else
+ parsedArguments.push(arguments[i]);
+ }
+ consoleMessage.setMessageBody(parsedArguments);
this.console.addMessage(consoleMessage);
}
@@ -1270,7 +1280,7 @@
WebInspector.log.repeatCount = repeatCount;
// ConsoleMessage expects a proxy object
- message = new WebInspector.ObjectProxy(null, [], 0, message, false);
+ message = new WebInspector.ObjectProxy(null, null, [], 0, message, false);
// post the message
var msg = new WebInspector.ConsoleMessage(
« no previous file with comments | « inspector/front-end/WatchExpressionsSidebarPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698