The default bug view has changed. See this FAQ.

Wrappers & TypeError: can't access dead object

RESOLVED WORKSFORME

Status

()

Core
DOM
RESOLVED WORKSFORME
5 years ago
5 years ago

People

(Reporter: Honza, Assigned: khuey)

Tracking

({regression})

15 Branch
x86
Windows Vista
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [firebug-p1])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
This could be a regression caused by bug 695480

I am now seeing bunch of "TypeError: can't access dead object".
This sounds good in general (since useful for mem leaks), but I am
also seeing the exception for the following code:

STR (you should be able to use Scratchpad):
var object = gBrowser.selectedBrowser.contentWindow.wrappedJSObject;
var parent = Object.getPrototypeOf(object);
Object.keys(parent);  // EXCEPTION

If the |object| is set to be:
"gBrowser.selectedBrowser.contentWindow" (no wrapper) it works.


I have also discussed the problem here:
http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/bf9419c4012b5b0d?hl=en#

Honza
Blocks: 695480
Keywords: regression
Version: Trunk → 15 Branch
(Reporter)

Comment 1

5 years ago
I am also marking as [firebug-p1] since several pieces of Firebug are broken by this issue.

Honza
Whiteboard: [firebug-p1]
I think the problem here is that we have magic to ensure that we don't kill wrappers to the Window object, but that magic doesn't consider the prototype chain of the Window object (which we should also not kill).
Assignee: nobody → khuey
Created attachment 621605 [details] [diff] [review]
Possible Patch

I can't reproduce this ... Honza, could you test this patch?
Attachment #621605 - Flags: feedback?
Attachment #621605 - Flags: feedback? → feedback?(odvarko)
Blocks: 751420
(Reporter)

Comment 4

5 years ago
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #3)
> Created attachment 621605 [details] [diff] [review]
> Possible Patch
> 
> I can't reproduce this ... Honza, could you test this patch?

I can't reproduce the problem any more (I didn't test the patch)

It works for me in the latest Nightly:
http://hg.mozilla.org/mozilla-central/rev/448f554f6acb

So, it looks like it has been fixed along the way...

---

Just in case somebody would be interested, I repeated the testing with:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012-05-03-03-05-12-mozilla-central/firefox-15.0a1.en-US.win32.zip

Build From: http://hg.mozilla.org/mozilla-central/rev/807403a04a6a


Better STR:
1) Download Firebug source git@github.com:firebug/firebug.git
2) Install two extensions (run them directly from the source)
Path to Firebug extension: <root>\firebug\extension
Path to FBTrace extension: <root>\firebug\trace\FBTrace

3) Run Firefox and load www.google.com
4) Press F12 to open Firebug UI
5) Select the Dom panel
6) Refresh the page, the DOM panel suddenly displays: There are no properties to show for this object. -> This is s symptom of the BUG

7) Now open FBTrace console (Firebug icon menu -> Open Firebug Tracing)
8) Click Tools button in the toolbar, a command line at the bottom of the window should be opened.

9) Put the following code into the command line:

var object = gBrowser.selectedBrowser.contentWindow.wrappedJSObject;
var parent = Object.getPrototypeOf(object);
Object.keys(parent);  // EXCEPTION

Press Evaluate (in the command line toolbar)

Now you should see "EXCEPTION TypeError: can't access dead object" in the FBTrace console.

---

I don't know if anyone is interested in more details, but since it works in latest Nightly, it can be probably closed....

Honza
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
(Reporter)

Updated

5 years ago
Attachment #621605 - Flags: feedback?(odvarko)
You need to log in before you can comment on or make changes to this bug.