Closed Bug 781040 Opened 12 years ago Closed 12 years ago

BindingUtils XrayResolveProperty needs to fault in JSJitInfos

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: efaust, Assigned: efaust)

References

Details

Attachments

(2 files)

We need to fault in JSJitInfos onto our resolved properties as well, or centralized codegen won't work with proxies.
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+
Attached patch FixSplinter Review
SET_JITINFO() defined in other patch.
Attachment #649910 - Flags: review?(bzbarsky)
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+
https://hg.mozilla.org/mozilla-central/rev/6bed0413c96e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: