Skip to content

Commit e658f53

Browse files
committed
DFL-3589 Implement extension name handling using info provided by CORE-41612.
1 parent df70524 commit e658f53

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/ecma-debugger/runtimes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ cls.EcmascriptDebugger["6.0"].Runtime = function(runtime)
1010
var OBJECT_ID = 3;
1111
var URI = 4;
1212
var DESCRIPTION = 5;
13+
var EXTENSION_NAME = 7;
1314

1415
this.runtime_id = runtime[RUNTIME_ID];
1516
this.html_frame_path = runtime[HTML_FRAME_PATH];
1617
this.window_id = runtime[WINDOW_ID];
1718
this.object_id = runtime[OBJECT_ID];
1819
this.uri = runtime[URI];
1920
this.description = runtime[DESCRIPTION];
21+
this.extension_name = runtime[EXTENSION_NAME];
2022
};
2123

2224
cls.EcmascriptDebugger["6.0"].Runtime.prototype = new URIPrototype("uri");
@@ -38,7 +40,7 @@ cls.EcmascriptDebugger["6.0"].ExtensionRuntime = function(rt)
3840
this.type = "extension";
3941
this.id = rt.runtime_id;
4042
this.uri = rt.uri;
41-
this.title = "Extension Runtime " + rt.runtime_id;
43+
this.title = "Extension" + (rt.extension_name ? ': ' + rt.extension_name : '');
4244
};
4345

4446
/**

src/window-manager/window-manager.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ cls.WindowManager["2.0"].WindowManagerData = function()
4141
TITLE = 1,
4242
WINDOW_TYPE = 2,
4343
OPENER_ID = 3;
44+
EXTENSION_NAME = 4;
4445
*/
45-
return {window_id: win[0], title: win[1], window_type: win[2], opener_id: win[3]};
46+
return {window_id: win[0], title: win[1], window_type: win[2], opener_id: win[3], extension_name: win[4]};
4647
};
4748

4849
this._set_active_window_as_debug_context = function()
@@ -461,7 +462,7 @@ cls.WindowManager["2.0"].DebuggerMenu = function(id, class_name)
461462
{
462463
return (
463464
["cst-option",
464-
win.title || "\u00A0",
465+
win.extension_name || win.title || "\u00A0",
465466
"opt-index", index,
466467
"value", win.window_id.toString(),
467468
"class", win.window_id == window_manager_data.get_debug_context() ?

0 commit comments

Comments
 (0)