Closed
Bug 613515
Opened 14 years ago
Closed 13 years ago
JS properties set from chrome are lost
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: mcs, Assigned: gal)
References
Details
(Keywords: regression, Whiteboard: [hardblocker][fixed-in-tracemonkey][fx4-fixed-bugday])
Attachments
(6 files)
4.97 KB,
application/x-xpinstall
|
Details | |
12.68 KB,
patch
|
Details | Diff | Splinter Review | |
1.41 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
30.47 KB,
text/plain
|
Details | |
334.84 KB,
application/octet-stream
|
Details | |
1.07 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
I mentioned this problem in bug 601803... I have an extension that assigns a JS Object to a property on a content element. In Firefox 4.0b7 and in current trunk builds, the object cannot be retrieved reliably from within the extension (the value is undefined). Usually, the object can be retrieved for at least a few seconds (or several retrievals) before undefined is returned. After undefined is returned the first time, subsequent retrievals always return undefined. We created a small extension that demonstrates the problem and we will post it here shortly. This problem does not occur in Firefox 3.6.12 or in Firefox 4.0b6.
Reporter | ||
Comment 1•14 years ago
|
||
To see the problem, install this extension. After page load, it adds an image element to the page and assigns a JS Object to the element in a property named MYPROP. It then starts a timer that checks MYPROP every second, displaying an alert when undefined is returned. Click the image to attempt to access MYPROP manually. We added the timer to make it easier to see the problem; without the timer, the problem will still occur if you click the image enough times.
Comment 2•14 years ago
|
||
Sounds like we don't gc-mark xray wrappers from the wrapped object?
blocking2.0: --- → ?
Assignee | ||
Updated•14 years ago
|
Group: core-security
Assignee | ||
Comment 3•14 years ago
|
||
If #2 is correct, we should hide the bug.
Comment 4•14 years ago
|
||
This shouldn't be a security bug. No GC hazard here. All this means is that expando properties get lost when the proxy gets recreated when the object is next touched from chrome.
Reporter | ||
Comment 5•14 years ago
|
||
(In reply to comment #4) > All this means is that expando properties get lost when the proxy gets > recreated when the object is next touched from chrome. So does that mean this is a valid bug? Or is this "by design"? If this is a valid bug, is it something that is likely to be fixed in an upcoming beta?
Comment 7•14 years ago
|
||
Blake, I thought that we were going to disallow setting custom properties on xray wrappers altogether. Did that not actually work out?
Comment 8•14 years ago
|
||
We need to sort this out one way or another before we ship.
blocking2.0: ? → betaN+
Comment 9•14 years ago
|
||
Andreas, mrbkap says you could fix this one. Over to you to offload mrbkap a bit.
Assignee: mrbkap → gal
Updated•14 years ago
|
Whiteboard: [hardblocker]
Assignee | ||
Comment 10•14 years ago
|
||
Assignee | ||
Comment 12•14 years ago
|
||
We are still seeing some rather strange failures so it will probably take another few days.
Comment 13•14 years ago
|
||
This patch applies on top of attachment 503712 [details] [diff] [review] and fixes the testcase here. I think that with these two patches, we can land this!
Attachment #504045 -
Flags: review?(gal)
Assignee | ||
Updated•14 years ago
|
Attachment #504045 -
Flags: review?(gal) → review+
Comment 14•13 years ago
|
||
The two attached patches combined cause test failures and leaks, specifically on the browser chrome test browser/base/content/test/browser_inspector_tab_switch.js. And I also see: REFTEST TEST-UNEXPECTED-FAIL | file:///home/cltbld/talos-slave/test/build/jsreftest/tests/jsreftest.html?test=js1_5/extensions/regress-369696-02.js | No test results reported. (SCRIPT) REFTEST TEST-UNEXPECTED-FAIL | file:///home/cltbld/talos-slave/test/build/jsreftest/tests/jsreftest.html?test=js1_5/Regress/regress-417893.js | No test results reported. (SCRIPT) on all platforms on try. Andreas, can you look into this more? Blake has his plate pretty full atm. I'll attach the output of a browser chrome test run w/o this set of patches (works.log) and with (fails.log).
Comment 15•13 years ago
|
||
Comment 16•13 years ago
|
||
Assignee | ||
Comment 17•13 years ago
|
||
Meh, leaks are my least favorite bugs to look at.
Assignee: mrbkap → gal
Comment 18•13 years ago
|
||
It is certainly possible that the leak is due to a failure in the test causing something to not be properly torn down. So maybe the best approach here is to fix the errors first (the jsreftest ones), and then check whether the leaks remain or not, etc. I can help test if you have something resembling a fix for some of the errors...
Assignee | ||
Comment 19•13 years ago
|
||
Yeah, good point.
Assignee | ||
Comment 20•13 years ago
|
||
jst, neither reftest has anything to do with wrappers. Are you sure no other patches were involved when you pushed?
Comment 21•13 years ago
|
||
I don't see anything else that could cause the tests, the push was based on a revision that didn't show any problems on m-c. The try results are at: http://tbpl.mozilla.org/?tree=MozillaTry&rev=e3650aaf3792 and the m-c results for the commit which mine was based on are at: http://tbpl.mozilla.org/?rev=b22bb39e834f I'll try to reproduce the js test failures locally to confirm.
Assignee | ||
Comment 22•13 years ago
|
||
I tried a local shell reftest run. If this is some mean GC bug, maybe we mess up an unrelated test in the browser?
Assignee | ||
Comment 23•13 years ago
|
||
jst can reproduce this
Comment 24•13 years ago
|
||
This fixes the issues seen in the last push to try. This is from Andreas, r=mrbkap.
Attachment #506041 -
Flags: review+
Assignee | ||
Comment 25•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/5a6e9e7e487a
Whiteboard: [hardblocker] → [hardblocker], fixed-in-tracemonkey
Comment 26•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/5a6e9e7e487a
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Blocks: 628599
Updated•13 years ago
|
Comment 27•13 years ago
|
||
Verified with Mozilla/5.0 (X11; Linux i686; rv:2.0b12pre) Gecko/20110204 Firefox/4.0b12pre
Status: RESOLVED → VERIFIED
Whiteboard: [hardblocker], fixed-in-tracemonkey → [hardblocker][fixed-in-tracemonkey][fx4-fixed-bugday]
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•