Closed
Bug 818432
Opened 12 years ago
Closed 12 years ago
[toolbox] this. tracked browser windows.delete is undefined
Categories
(DevTools :: Framework, defect, P2)
DevTools
Framework
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 21
People
(Reporter: miker, Assigned: jwalker)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
paul
:
review+
|
Details | Diff | Splinter Review |
We have temporarily moved it below "if (!this._tools)" but we should fix this properly.
Original Github PR:
https://github.com/joewalker/devtools-window/pull/257
Reporter | ||
Comment 1•12 years ago
|
||
We should find out why the destructor is called twice (or before initialization). We could also trap exceptions if necessary.
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jwalker
Assignee | ||
Comment 2•12 years ago
|
||
I think we should tackle this alongside memory leak issues. I favour getting rid of all the "delete this.****" statements in the destroy functions, but we need to make sure we clear up after ourselves in order to do that.
Updated•12 years ago
|
Component: Developer Tools → Developer Tools: Framework
Assignee | ||
Comment 3•12 years ago
|
||
The approach that I've taken here is: sometimes preventing double-delete is hard. A good clean-up function can clean-up without crippling itself, and there's no point in gratuitously causing problems by deleting things you don't need to delete.
The change to Toolbox isn't directly connected, but it code that seems wrong to me. Comment added for feedback. Depending on what we think I could remove this section before commit.
Attachment #699645 -
Flags: review?(paul)
Comment 4•12 years ago
|
||
Comment on attachment 699645 [details] [diff] [review]
v1
>+ /*
>+ // this._currentToolId is set at the end of selectTool so unless
>+ // we're going to be calling open after selectTool (???) then it's
>+ // always going to be undefined, so we can just remove this code
>+ // especially given the new raise code ???
That was no-op? I did that :)
>@@ -217,8 +217,13 @@ DevTools.prototype = {
> destroy: function() {
> Services.obs.removeObserver(this.destroy, "quit-application");
>
>- delete this._trackedBrowserWindows;
>- delete this._toolboxes;
>+ for (let [key, tool] of this._tools) {
>+ this.unregisterTool(key);
Will this trigger the "tool-unregistered" event, and do all the
related DOM modifications? We want to avoid that (performance).
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #699645 -
Attachment is obsolete: true
Attachment #699645 -
Flags: review?(paul)
Attachment #700355 -
Flags: review?(paul)
Updated•12 years ago
|
Attachment #700355 -
Flags: review?(paul) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Fx-Team&rev=fd6d84e5bf49
https://hg.mozilla.org/integration/fx-team/rev/346ee288166b
Whiteboard: [fixed-in-fx-team]
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 21
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•