cappuccino / cappuccino

Web Application Framework in JavaScript and Objective-J
https://cappuccino.dev/
GNU Lesser General Public License v2.1
2.22k stars 335 forks source link

Cappuccino is throwing security exceptions in Adobe AIR #312

Closed achicu closed 15 years ago

achicu commented 15 years ago

I've tried the starter application in Adobe AIR and I've got the following exception: Error: Adobe AIR runtime security violation for JavaScript code in the application security sandbox (Function constructor) objj_exception_report at app:/Frameworks/Objective-J/Objective-J.js : 1556 fragment_evaluate_code at app:/Frameworks/Objective-J/Objective-J.js : 2243 at app:/Frameworks/Objective-J/Objective-J.js : 2211 at app:/Frameworks/Objective-J/Objective-J.js : 2225

It looks like the "new Function()" is called after onLoad is trigger. In AIR all the evals should happen before onLoad.

cappuccino commented 15 years ago

This is not a bug. It's by design. If you want to use AIR, you have to use the "press" tool to concatenate and pre-process all the javascript ahead of time.

achicu commented 15 years ago

Oh, didn't know about it. I've created a workaround that loads the scripts synchronously. I just post it here maybe it helps somebody.

http://gist.github.com/221235