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)

enhancement
Not set
normal

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.
I am hacking around this bug in devtools/shared/webconsole/test/test_object_actor_native_getters_lenient_this.html for now.
_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?
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.
Product: Firefox → DevTools
(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.