ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

IdwsCompiler is unsafe #400

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A few revisions ago, the compiler had an interface placed on it to allow 
extensions access to compiler internals.  Unfortunately, this means that if any 
extension acquires and then releases a reference to IdwsCompiler for any 
reason, the compiler will be destroyed in the middle of a compile.

Original issue reported on code.google.com by masonwhe...@gmail.com on 16 May 2013 at 5:19

GoogleCodeExporter commented 8 years ago
Does r2111 fix that or did I misunderstood?

Original comment by zar...@gmail.com on 17 May 2013 at 10:11

GoogleCodeExporter commented 8 years ago
This should fix it, as long as no one uses TdwsCompiler directly rather than 
through TDelphiWebScript.

Putting a comment on the declaration of the TdwsCompiler class saying that 
anyone using it should hold a reference to IdwsCompiler instead of an object 
reference should be sufficient.

Original comment by masonwhe...@gmail.com on 17 May 2013 at 12:56

GoogleCodeExporter commented 8 years ago

Original comment by zar...@gmail.com on 17 May 2013 at 1:21