]> khamidou — GitHub mirrors - electron.git/commit
Wrap callbacks with v8::Locker.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 27 Jan 2014 07:14:11 +0000 (15:14 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 27 Jan 2014 07:14:11 +0000 (15:14 +0800)
commitd63de1ae15a1d5918a75432f7566377e05583395
tree72f2f290f9efab4c22b2794689c289f263f04ef3
parent5250871e69e6acca568ccfae893d538a7c32eb9b
Wrap callbacks with v8::Locker.

In browser process, because of the use of v8::Locker in ProxyResolverV8,
creating HandleScope requires entering locker first, so in browser
process we should just use v8::Locker whenever we need to use V8 in a
callback called from non-V8 places (like dialog's callback, work pushed
to MessageLoop).

But also notice that the renderer process doesn't use v8::Locker, so we
have to be careful not to use it, otherwise blink would crash when
creating HandleScope.
browser/api/atom_api_dialog.cc
browser/api/atom_api_menu.cc
browser/api/atom_api_protocol.cc
browser/api/atom_api_window.cc
browser/api/atom_browser_bindings.cc
browser/atom_browser_main_parts.cc
common/api/atom_api_event_emitter.cc
common/node_bindings.cc