Closed
Bug 1438015
Opened 6 years ago
Closed 6 years ago
_findSafeGetterValues doesn't make much sense for Promise-returning attributes
Categories
(DevTools :: Debugger, enhancement)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1477765
People
(Reporter: bzbarsky, Unassigned)
Details
When I added a Promise-typed attribute on Document, devtools/shared/webconsole/test/test_object_actor_native_getters_lenient_this.html failed. This was because aResponse.safeGetterValues contains the name of that attribute. And that happens because _findSafeGetterValues over in object.js doesn't really make sense, afaict. It's trying to filter out some attributes somewhere, but the filtering it does wouldn't work for Promise-returning attributes, which would return a rejected Promise where this code expects an exception.
Reporter | ||
Comment 1•6 years ago
|
||
I am hacking around this bug in devtools/shared/webconsole/test/test_object_actor_native_getters_lenient_this.html for now.
Comment 2•6 years ago
|
||
_findSafeGetterValues is known to be fragile https://searchfox.org/mozilla-central/source/devtools/server/actors/object.js#354. CC :jimb what do you think we should do?
Reporter | ||
Comment 3•6 years ago
|
||
Jim and I had a long conversation about this on IRC, fwiw; I was assuming he would follow up here. He recommended changing _findSafeGetterValues to treat an already-rejected return value promise just like a thrown exception is treated.
Updated•6 years ago
|
Product: Firefox → DevTools
Comment 4•6 years ago
|
||
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #3) > He recommended changing _findSafeGetterValues to treat an already-rejected > return value promise just like a thrown exception is treated. I'm making this change in Bug 1477765.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•