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

Unified Diff: webkit/glue/devtools/js/debugger_agent.js

Issue 443002: Support context data in form of a string... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « no previous file | webkit/glue/devtools/js/devtools_host_stub.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/debugger_agent.js
===================================================================
--- webkit/glue/devtools/js/debugger_agent.js (revision 33057)
+++ webkit/glue/devtools/js/debugger_agent.js (working copy)
@@ -983,7 +983,18 @@
if (this.contextId_ === null) {
return true;
}
- return (scriptContextId.value == this.contextId_);
+ if (goog.isString(context.data)) {
+ // Find the id from context data. The context data has the format "type,id".
+ var comma = context.data.indexOf(',');
+ if (comma < 0) {
+ return false;
+ }
+ return (parseInt(context.data.substring(comma + 1)) == this.contextId_);
+ } else {
+ // TODO(sgjesse) remove this when patch for
+ // https://bugs.webkit.org/show_bug.cgi?id=31873 has landed in Chromium.
+ return (scriptContextId.value == this.contextId_);
+ }
};
@@ -1075,7 +1086,20 @@
*/
devtools.DebuggerAgent.prototype.addScriptInfo_ = function(script, msg) {
var context = msg.lookup(script.context.ref);
- var contextType = context.data.type;
+ var contextType;
+ if (goog.isString(context.data)) {
+ // Find the type from context data. The context data has the format
+ // "type,id".
+ var comma = context.data.indexOf(',');
+ if (comma < 0) {
+ return
+ }
+ contextType = context.data.substring(0, comma);
+ } else {
+ // TODO(sgjesse) remove this when patch for
+ // https://bugs.webkit.org/show_bug.cgi?id=31873 has landed in Chromium.
+ contextType = context.data.type;
+ }
this.parsedScripts_[script.id] = new devtools.ScriptInfo(
script.id, script.name, script.lineOffset, contextType);
if (this.scriptsPanelInitialized_) {
« no previous file with comments | « no previous file | webkit/glue/devtools/js/devtools_host_stub.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698