Skip to content

Commit

Permalink
Fixed crash on Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeche committed Mar 25, 2013
1 parent 0931a6d commit 8981aa8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions emmet/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,15 @@ def js(self):
if self._use_unicode is None:
self._use_unicode = should_use_unicode()

glue = u'\n' if self._use_unicode else '\n'
core_src = [self.read_js_file(make_path(f)) for f in self._core_files]

self._ctx = PyV8.JSContext()
self._ctx.enter()
self._ctx.eval(glue.join(core_src))

for f in self._core_files:
self._ctx.eval(self.read_js_file(make_path(f)), name=f, line=0, col=0)
# for f in self._core_files:
# self._ctx.eval(self.read_js_file(make_path(f)), name=f, line=0, col=0)

# load default snippets
self._ctx.locals.pyLoadSystemSnippets(self.read_js_file(make_path('snippets.json')))
Expand Down

0 comments on commit 8981aa8

Please sign in to comment.