A DisallowJavascriptExecution scope indicates that the following code relies on no JavaScript code being executed. If you execute JavaScript code anyway, you will probably cause corruption and subsequent crashes or misbehavior. The CHECK-failure exists to point out the problem early and in an easy-to-understand fashion; overriding it with an AllowJavascriptExecutionScope is like removing the "Danger! Minefield!" warning sign before walking into a minefield.
You should probably keep a list of cleanup calls you want to make, and execute them when the event loop gets back to you, rather than immediately. On Fri, May 11, 2018 at 7:15 AM madana gopal <madanagopal...@gmail.com> wrote: > Hi Team, > > We are using using node v6.9.0. We faced a crash, when there is a > javascript call being made from our app c++ code. Crash is happening > because, call is made within the DisallowJavascriptExecutionScope. This > scope is set in OptimizedCompileJob::GenerateCode() in compiler.cc. > Scenario is garbage collection is initiated from below code, which caused > some cleanup calls to be called from our app to javascript. > > OptimizedCompileJob::Status OptimizedCompileJob::GenerateCode() { > ............................ > DisallowJavascriptExecution no_js(isolate()); > { > ..................... > RegisterWeakObjectsInOptimizedCode() -> it is invoking garbage > collection, which landed up to the code in our app > .............. > } > } > > Please clarify, during this time of operation, is it good to call our > javascript call with AllowJavaScriptExecutionScope. Will it have any side > effects?. Please clarify. > > Thanks. > > Regards, > Madan > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.