Opened 14 years ago
Closed 13 years ago
#1259 closed defect (duplicate)
ShrinkSafe: forward reference problem (plugin.js broken)
Reported by: | 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)
Change History (8)
Changed 14 years ago by
comment:1 Changed 14 years ago by
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 14 years ago by
Owner: | changed from anonymous to alex |
---|
comment:3 Changed 14 years ago by
Milestone: | → 0.5 |
---|
comment:4 Changed 14 years ago by
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 14 years ago by
Summary: | ShinkSafe breaks plugin.js → ShrinkSafe breaks plugin.js |
---|
comment:6 Changed 13 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Summary: | ShrinkSafe breaks plugin.js → ShrinkSafe: forward reference problem (plugin.js broken) |
Dup of #3241 (although this one came first...)
Original JavaScript?