Last Comment Bug 679879 - Change JSFunction macros to methods
: Change JSFunction macros to methods
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86 Mac OS X
: -- normal (vote)
: mozilla9
Assigned To: Jason Orendorff [:jorendorff]
:
Mentors:
: 513014 (view as bug list)
Depends on: 680755
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-17 14:22 PDT by Jason Orendorff [:jorendorff]
Modified: 2011-08-26 04:03 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
part 2, js/src - v1 (78.59 KB, patch)
2011-08-17 14:24 PDT, Jason Orendorff [:jorendorff]
jwalden+bmo: review+
Details | Diff | Splinter Review
part 1, caps - v1 (2.06 KB, patch)
2011-08-17 15:42 PDT, Jason Orendorff [:jorendorff]
mrbkap: review+
Details | Diff | Splinter Review

Description Jason Orendorff [:jorendorff] 2011-08-17 14:22:48 PDT

    
Comment 1 Jason Orendorff [:jorendorff] 2011-08-17 14:24:10 PDT
Created attachment 553905 [details] [diff] [review]
part 2, js/src - v1
Comment 2 Jason Orendorff [:jorendorff] 2011-08-17 15:42:00 PDT
Created attachment 553934 [details] [diff] [review]
part 1, caps - v1

Use JS_GetPrivate rather than GET_FUNCTION_PRIVATE in caps.
Comment 3 Jeff Walden [:Waldo] (remove +bmo to email) 2011-08-17 18:19:24 PDT
Comment on attachment 553905 [details] [diff] [review]
part 2, js/src - v1

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

::: js/src/jsapi.cpp
@@ +4355,5 @@
>               * As jsapi.h notes, fs must point to storage that lives as long
>               * as fun->object lives.
>               */
>              Value priv = PrivateValue(fs);
> +            if (!js_SetReservedSlot(cx, fun, 0, priv))

You could make this fun->setReservedSlot(0, priv) now, right?

::: js/src/jsfun.h
@@ +229,5 @@
>      static const uint32 CLASS_RESERVED_SLOTS = JSObject::FUN_CLASS_RESERVED_SLOTS;
> +
> +
> +    js::Class *getConstructorClass() const {
> +        JS_ASSERT(!isInterpreted());

isNative() seems more to the point here, to me.

@@ +234,5 @@
> +        return u.n.clasp;
> +    }
> +
> +    void setConstructorClass(js::Class *clasp) {
> +        JS_ASSERT(!isInterpreted());

And here.

@@ +239,5 @@
> +        u.n.clasp = clasp;
> +    }
> +
> +    JSNativeTraceInfo *getTraceInfo() {
> +        JS_ASSERT(!isInterpreted());

And here.
Comment 6 Jason Orendorff [:jorendorff] 2011-08-26 04:03:57 PDT
*** Bug 513014 has been marked as a duplicate of this bug. ***

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