BindingUtils XrayResolveProperty needs to fault in JSJitInfos

RESOLVED FIXED in mozilla17

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: efaust, Assigned: efaust)

Tracking

unspecified
mozilla17
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
We need to fault in JSJitInfos onto our resolved properties as well, or centralized codegen won't work with proxies.
(Assignee)

Comment 1

5 years ago
Created attachment 649874 [details] [diff] [review]
Cut a hole to set JSJitInfos on created function objects.
Attachment #649874 - Flags: review?(bpeterson)

Comment 2

5 years ago
Comment on attachment 649874 [details] [diff] [review]
Cut a hole to set JSJitInfos on created function objects.

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

::: js/src/jsfriendapi.h
@@ +1356,5 @@
> +static JS_ALWAYS_INLINE void
> +SET_JITINFO(JSFunction * func, const JSJitInfo *info)
> +{
> +    js::shadow::Function *fun = reinterpret_cast<js::shadow::Function *>(func);
> +    JS_ASSERT(!(fun->flags & 0x4000)); /* JS_ASSERT(fun->isNative()) */

Explain where the 0x4000 comes from.

::: js/src/jsfun.h
@@ +34,5 @@
>   * move to u.i.script->flags. For now we use function flag bits to minimize
>   * pointer-chasing.
> + *
> + * NB: JSFUN_INTERPRETED is hardcode duplicated in SET_JITINFO() in
> + * jsfriendapi.h. If it changes, it must also be updated there.

Move to right above JSFUN_INTERPRETED.
Attachment #649874 - Flags: review?(bpeterson) → review+
(Assignee)

Comment 3

5 years ago
Created attachment 649910 [details] [diff] [review]
Fix

SET_JITINFO() defined in other patch.
Attachment #649910 - Flags: review?(bzbarsky)

Comment 4

5 years ago
Comment on attachment 649910 [details] [diff] [review]
Fix

So what the code used to do is pass the global of "wrapper" to the JS_NewFunction call and to use JS_NewFunction, not JS_NewFunctionById.  I'd prefer we maintain compat with that here.

You have some missing spaces after args in the setter case.

Maybe s/newFlags/descFlags/?

r=me with those.
Attachment #649910 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6bed0413c96e

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/6bed0413c96e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.