Closed Bug 605660 Opened 15 years ago Closed 15 years ago

Object.init() was recently hidden by API versioning, but existing content relies on it

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stejohns, Assigned: stejohns)

Details

(Whiteboard: WE:2740532)

Attachments

(1 file)

In the sad-but-true department: At least one Facebook game ("Crazy Cow Music Game") has a call to "::init()" in one of its classes constructors. Prior to Argo, this happened to work, because it resolved (eventually) to Object.init(), which is (mostly) harmless to call repeatedly. However, in Argo, this call was hidden (via AIR_SYS) and so this game throws an RTE during startup. Not sure if we *should* fix this, since the content was in the just-getting-luck category, but it introduces an incompatibility...
Correction: bug is not in Argo (change was introduced after Argo lockdown) but is in Spicy/Serrano.
It might be possible to contact the devs of that game proactively if this is a unique case.
I'll bet you a dollar we'll find other SWFs that do this. (The question is how many, of course.)
Is there a fingerprint we can scan for using Brightspot?
(In reply to comment #4) > Is there a fingerprint we can scan for using Brightspot? Maybe, but probably not reliably -- depends on the code being used to invoke "init" and how it happens to resolve (or not).
Since init() has an effect - it restores the standard values of Object.prototype in the event they have been updated by the program - it could in principle be called deliberately by content to achieve just that effect.
(In reply to comment #6) > Since init() has an effect - it restores the standard values of > Object.prototype in the event they have been updated by the program - it could > in principle be called deliberately by content to achieve just that effect. True, but this seems even less likely than the existing, apparently-accidental use case.
For Spicy, I'm going to revert this change in the name of compatibility.
Attached patch PatchSplinter Review
Provide an empty stub with the same signature as the old Object.init.
Assignee: nobody → stejohns
Attachment #489284 - Flags: review?(lhansen)
Whiteboard: WE:2740532
Comment on attachment 489284 [details] [diff] [review] Patch R+ with reservations as outlined in earlier comments - this fix does not actually revert us to the old behavior, but it's probably the right trade-off.
Attachment #489284 - Flags: review?(lhansen) → review+
TR 5535:3b7ea1e01705
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: