cocos2d-x/plugin-x — pull request #42 by NatWeiss (2014-06-05 21:00:12+00:00)
Title: Safeguard for plugin object

On iOS and Android, without a safeguard runtime errors can occur, causing a black screen.

Without `var`:

JS: assets/jsb/jsb_pluginx.js:1:ReferenceError: plugin is not defined

Without `plugin.ProtocolAds`, et cetera:

JS: assets/jsb/jsb_pluginx.js:11:TypeError: plugin.ProtocolAds is undefined

This safeguard fixes the errors.