crosswalk-project/crosswalk — pull request #2222 by halton (2014-07-23 08:07:56+00:00)
Title: [Extensions] Check validation of XWalkExtensionInstance before binding callbacks

...allbacks.

There is race condition that sometimes CreateInstance() return invalid
XWalkExtensionInstance.

So far, this crash does not happen on any C++ extensions or Android
extension tests. Only happens on CordovaTests apk. And worse and worse
when loadUrl calling times increased.

Meanwhile, the Android speicific function RegisterExtension() and
UnregisterExtension() are removed from xwalk_browser_main_parts.h

BUG=https://crosswalk-project.org/jira/browse/XWALK-1688