Permalink
Browse files

Run library files in the global context

  • Loading branch information...
1 parent 1dec5ea commit 4ff9a9700772cb2d21d5458489a8c570fbbc1616 @creationix creationix committed Mar 23, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/cio_libs.cc
View
@@ -1,5 +1,6 @@
#include "cio_libs.h"
+#include "cio.h" // cio_global_context
#include "candor.h"
#include <stdio.h>
@@ -19,6 +20,7 @@ Object* cio_##name##_module() { \
int len = &_binary_lib_##name##_can_end - \
&_binary_lib_##name##_can_start; \
Function* fn = Function::New(code, len); \
+ fn->SetContext(cio_global_context()); \
module_##name.Wrap(fn->Call(0, NULL)); \
return *module_##name; \
} \

0 comments on commit 4ff9a97

Please sign in to comment.