Last Comment Bug 781040 - BindingUtils XrayResolveProperty needs to fault in JSJitInfos
: BindingUtils XrayResolveProperty needs to fault in JSJitInfos
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla17
Assigned To: Eric Faust [:efaust]
:
Mentors:
Depends on:
Blocks: 773546
  Show dependency treegraph
 
Reported: 2012-08-07 16:37 PDT by Eric Faust [:efaust]
Modified: 2012-08-08 09:28 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Cut a hole to set JSJitInfos on created function objects. (2.03 KB, patch)
2012-08-07 16:38 PDT, Eric Faust [:efaust]
benjamin: review+
Details | Diff | Review
Fix (3.11 KB, patch)
2012-08-07 18:10 PDT, Eric Faust [:efaust]
bzbarsky: review+
Details | Diff | Review

Description Eric Faust [:efaust] 2012-08-07 16:37:27 PDT
We need to fault in JSJitInfos onto our resolved properties as well, or centralized codegen won't work with proxies.
Comment 1 Eric Faust [:efaust] 2012-08-07 16:38:22 PDT
Created attachment 649874 [details] [diff] [review]
Cut a hole to set JSJitInfos on created function objects.
Comment 2 :Benjamin Peterson 2012-08-07 16:44:39 PDT
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.
Comment 3 Eric Faust [:efaust] 2012-08-07 18:10:56 PDT
Created attachment 649910 [details] [diff] [review]
Fix

SET_JITINFO() defined in other patch.
Comment 4 Boris Zbarsky [:bz] 2012-08-07 19:27:39 PDT
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.
Comment 6 Ed Morley [:emorley] 2012-08-08 09:28:03 PDT
https://hg.mozilla.org/mozilla-central/rev/6bed0413c96e

Note You need to log in before you can comment on or make changes to this bug.