Opened 13 years ago

Closed 12 years ago

#1259 closed defect (duplicate)

ShrinkSafe: forward reference problem (plugin.js broken)

Reported by: rmoore@… Owned by: alex
Priority: high Milestone: 0.9
Component: General Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description

Running ShinkSafe? against the plugin.js library (http://www.knallgrau.at/code/plugin_js) results in invalid JavaScript?. The function 'supportsNavigatorPlugins' is renamed to '_36' but calling references still refer to it by its original name.

Attachments (2)

plugin.js (27.3 KB) - added by guest 13 years ago.
Original JavaScript?
plugin.compressed.js (14.8 KB) - added by guest 13 years ago.
Generated JavaScript?

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by guest

Attachment: plugin.js added

Original JavaScript?

Changed 13 years ago by guest

Attachment: plugin.compressed.js added

Generated JavaScript?

comment:1 Changed 13 years ago by rmoore@…

It appears that if I move the non-instance/static functions to the top of PluginFactory? (prior to any references to these functions in the code) that ShinkSafe? processes them correctly.

comment:2 Changed 13 years ago by bill

Owner: changed from anonymous to alex

comment:3 Changed 13 years ago by dylan

Milestone: 0.5

comment:4 Changed 13 years ago by rmoore@…

After some more testing, it seems that the issue is that any references to a variable (which in this case are functions) are not updated to the obfuscated variable name if the references appear before the variable is declared. So in my case even though I had moved the static functions to the top of the object I had to move 'hasActiveXObject' to above 'getProgIdForActiveXObject' since 'getProgIdForActiveXObject' calls 'hasActiveXObject'.

comment:5 Changed 13 years ago by guest

Summary: ShinkSafe breaks plugin.jsShrinkSafe breaks plugin.js

comment:6 Changed 12 years ago by bill

Resolution: duplicate
Status: newclosed
Summary: ShrinkSafe breaks plugin.jsShrinkSafe: forward reference problem (plugin.js broken)

Dup of #3241 (although this one came first...)

Note: See TracTickets for help on using tickets.