Kill object typeof hook

RESOLVED FIXED in mozilla21

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: evilpie, Assigned: evilpie)

Tracking

Trunk
mozilla21
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
With e4x gone and the window.all hack gone, we are able to remove typeof hacks. Because checking for [[Call]] should to the right thing (TM).

Try run looks good, assuming we have sufficient tests. https://tbpl.mozilla.org/?tree=Try&rev=16f8f8eb81e3
(Assignee)

Updated

6 years ago
Duplicate of this bug: 732431
(Assignee)

Comment 2

6 years ago
*remove typeof hooks. *should do the right thing.
(Assignee)

Comment 3

6 years ago
Created attachment 711277 [details] [diff] [review]
remove typeof hook

I just ripped out everything until it compiled. I think we can simplify some JIT code and maybe also remove JSType somehow.
Assignee: general → evilpies
Status: NEW → ASSIGNED
Attachment #711277 - Flags: review?(jorendorff)
Comment on attachment 711277 [details] [diff] [review]
remove typeof hook

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

Great!

::: js/xpconnect/src/XPCWrappedNativeJSOps.cpp
@@ +1407,5 @@
> +    // Note: Per Ecmascript only objects with a [[Call]] are typeof "function"
> +    if (mFlags.WantCall())
> +        mJSClass.base.call = XPC_WN_Helper_Call;
> +    if (mFlags.WantConstruct())
> +        mJSClass.base.construct = XPC_WN_Helper_Construct;

The comment added here is rather baffling. Just remove it?
Attachment #711277 - Flags: review?(jorendorff) → review+
(Assignee)

Comment 6

6 years ago
I dropped the changes to XPC before check-in.
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b5dc3b3b21c

Comment 7

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