Closed Bug 1256688 Opened 8 years ago Closed 8 years ago

Change implementation of BaseProxyHandler::has() to follow ES6 [[HasProperty]] specification

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

Details

Attachments

(3 files)

Same idea as bug 1083211. The biggest advantage here is the removal of the getPropertyDescriptor call. Sadly Sandbox and Xray still require the old getPropertyDescriptor based semantics.
Blocks: 1156077
No longer blocks: 978228
Assignee: nobody → evilpies
This also removes the DOMProxyHandler override, because it is basically a copy of the new implementation expressed differently.
Attachment #8731594 - Flags: review?(jorendorff)
This is just what we did in Bug 1242072 for ::get. It is the simplest solution for having this continue to work before somebody does a deeper fix for Xrays.
Attachment #8731596 - Flags: review?(peterv)
Comment on attachment 8731596 [details] [diff] [review]
Continue using getPropertyDescriptor for has in XrayWrapper

Review of attachment 8731596 [details] [diff] [review]:
-----------------------------------------------------------------

:-(.
Attachment #8731596 - Flags: review?(peterv) → review+
Comment on attachment 8731599 [details] [diff] [review]
Continue using getPropertyDescriptor for has in Sandbox

Review of attachment 8731599 [details] [diff] [review]:
-----------------------------------------------------------------

Would calling JS_HasPropertyById on wrappedObject(proxy) be equivalent?
Attachment #8731599 - Flags: review?(peterv) → review+
Comment on attachment 8731594 [details] [diff] [review]
Change BPH::has to follow [[HasProperty]] for ordinary objects

Review of attachment 8731594 [details] [diff] [review]:
-----------------------------------------------------------------

Yes please.
Attachment #8731594 - Flags: review?(jorendorff) → review+
(In reply to Peter Van der Beken [:peterv] from comment #5)
> Comment on attachment 8731599 [details] [diff] [review]
> Continue using getPropertyDescriptor for has in Sandbox
> 
> Review of attachment 8731599 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Would calling JS_HasPropertyById on wrappedObject(proxy) be equivalent?

I think so in this case. I am working on patches to remove getPropertyDescriptor completely, so I will figure this out soon anyway.
You need to log in before you can comment on or make changes to this bug.